Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 09:37:09 09:37


Login with username, password and session length


Pages: [1]
Print
Author Topic: problem timing and print instruction in simulation with atmega168 and bascom  (Read 5623 times)
0 Members and 2 Guests are viewing this topic.
picavr
Active Member
***
Offline Offline

Posts: 176

Thank You
-Given: 267
-Receive: 101


« 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
Logged
picavr
Active Member
***
Offline Offline

Posts: 176

Thank You
-Given: 267
-Receive: 101


« Reply #1 on: January 09, 2019, 10:33:36 22:33 »

resolved
the problem is in CLCKDIV8 must be set in proteus
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4668

Thank You
-Given: 834
-Receive: 4322


There is no evidence that I muted SoNsIvRi


« Reply #2 on: January 09, 2019, 10:43:08 22:43 »

that is only part of the problem. you are running at default 16Mhz. in Proteus.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
picavr
Active Member
***
Offline Offline

Posts: 176

Thank You
-Given: 267
-Receive: 101


« Reply #3 on: January 10, 2019, 12:39:15 12:39 »

no no ,all values are in  default in proteus ...now its work fine
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC