You are on page 1of 2

PIC10F Simulator IDE Getting Started

This presentation will help you to test the included DEM !"#S e$ample and in that way get ac%uainted with the most &re%uently used &eatures o& PIC10F Simulator IDE! E'#MP(E 1 ) E$amine demo!*as &ile &rom the application &older! This program reads analog +alue on #,0 analog input and sends &ormatted output to an e$ternal de+ice using so&tware implemented serial communication! File demo!asm was generated using integrated "asic compiler! File demo!he$ was generated using integrated assem*ler! Define CONFIG = 0x00a Define CLOCK_FREQUENCY = 4 Define OSCCAL_VALUE = 0xfe Define SEROUT_REG = GPIO Define SEROUT_BIT = Define SEROUT_BAUD = !"00 Di# an0 A$ B%&e Di# i A$ B%&e ADCON0'ANS = 0 ($e&)* GP *in f+, -i.i&a/ *),*+$e$

/++*0 A-1in 02 an0 Se,+)& 3Ana/+. 4a/)e AN0 = 3 i = an0 5 00 (.e& n)#6e, +f 00$ in AN0 an0 = an0 7+- 00 i = i 8 49 (&+ .e& an a$1ii 4a/)e +f I Se,+)& i i = an0 5 0 i = i 8 49 Se,+)& i i = an0 7+- 0 i = i 8 49 Se,+)& i2 C,Lf :ai&7$ G+&+ /++* ) Start PIC10F Simulator IDE! ) Clic- on ptions.Select Microcontroller! ) Select /PIC10F000/ and clic- on Select *utton! ) Clic- on Tools."#SIC Compiler ) Clic- on File. pen ) Select demo!*as &ile and clic- on pen! The *asic source program will *e displayed in the editor! ) Clic- on Tools.Compile 1 #ssem*le 1 (oad! The compiler will generate demo!asm &ile with assem*ler source! The integrated assem*ler will assem*le that &ile and ma-e demo!lst and demo!he$ &iles! Demo!he$ &ile will *e loaded into the simulator program memory! ) Select the option Compact Microcontroller 2iew &rom the ptions menu! ) Clic- on Tools.Microcontroller 2iew! That will open the Microcontroller 2iew window! ) Clic- on Tools.So&tware 3#4T Simulation Inter&ace! ) n the opened window clic- on T' (ine la*el and select GPI !1 pin! ) 5ith similar procedure select GPI !0 pin &or the 4' (ine and 6700 &or the *aud rate! ) Clic- on Tools. scilloscope! That will open the &our channel digital oscilloscope window! ) Select Fast mode &rom the Mode menu! ) Clic- on Settings.Turn n8 && scilloscope Channel 1! ) Select GPI !1 and then clic- on Select! ) 4eposition the windows on the screen to get *etter +iew! I& needed use #lways n Top option on

the windows! ) Select the 4ate.E$tremely Fast simulation rate! ) Clic- on Simulation.Start! The simulation will start immediately! ) Clic- on # *utton associated with GP08#,0 pin! ) 3sing the slider change the analog +alue on this pin and clic- on #ccept *utton! ) 5atch how &ormatted output is *eing displayed on the So&tware 3#4T Simulation Inter&ace window! ) The last three steps can *e repeated! ) The simulation can *e stopped any time *y clic-ing on Simulation.Stop! ) Try to run the simulation in Step "y Step mode while the "asic Compiler window is opened and demo!*as &ile loaded in the editor! Then use 4un To ,e$t "asic Statement command! ) Screenshot9 +iew

You might also like