Title: problem timing and print instruction in simulation with atmega168 and bascom Post by: picavr on January 09, 2019, 08:14:04 20:14 helo
help me to resolve problem with timing and print instruction in simulation with proteus with atmega8 ok but withe atmega168 wrong character $regfile = "m168def.dat" ' specify the used micro $crystal = 8000000 ' used crystal frequency $baud = 9600 ' use baud rate $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space 'until ESC is pressed '----------------------------------------------------------------------------------------- ' default use 40 for the frame space Config Lcdpin = Pin , Db4 = PORTB.3 , Db5 = PORTB.2 , Db6 = PORTB.1 , Db7 = PORTB.0 , E = PORTB.4 , Rs = PORTB.5 Config Lcd = 20 * 4 ' default use 40 for the frame space 'first compile and run this program with the line below remarked 'Config Serialin = Buffered , Size = 80 Do Print ;"Start" waitms 1000 Locate 1 , 1 : lcd ;"123" 'wait 1 second Loop Title: Re: problem timing and print instruction in simulation with atmega168 and bascom Post by: picavr on January 09, 2019, 10:33:36 22:33 resolved
the problem is in CLCKDIV8 must be set in proteus Title: Re: problem timing and print instruction in simulation with atmega168 and bascom Post by: pickit2 on January 09, 2019, 10:43:08 22:43 that is only part of the problem. you are running at default 16Mhz. in Proteus.
Title: Re: problem timing and print instruction in simulation with atmega168 and bascom Post by: picavr on January 10, 2019, 12:39:15 12:39 no no ,all values are in default in proteus ...now its work fine
|