Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Reading Timer value on Simulation

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
quick09

Bascom Member



Joined: 03 Jun 2008
Posts: 4

south_korea.gif
PostPosted: Thu Apr 28, 2022 6:05 am    Post subject: Reading Timer value on Simulation Reply with quote

Hi,
When I test timers, It shows strange as under.
I'm expecting some value on Timer0 and Timer3 but, just shows 0.
Do I need to do some more to have the correct it? Rolling Eyes

Anyway, I set ON the ON Timers in the simulator.

Thanks
SD Kim

-----------------------------------------------------------

$regfile = "m128def.dat"

$crystal = 16000000
$baud = 115200
$hwstack = 256
$swstack = 256
$framesize = 128

Config Timer0 = Timer , Prescale = 256
Config Timer1 = Timer , Prescale = 256
Config Timer2 = Timer , Prescale = 256
Config Timer3 = Timer , Prescale = 256

do
print "--------------"
print "0:";timer0
print "1:";timer1
print "2:";timer2
print "3:";timer3
loop


On Simulation.. (I set on the ON Timers)
--------------
0:0
1:15
2:28
3:0
--------------
0:0
1:68
2:81
3:0
--------------
0:0
1:121
2:134
3:0
....
...

(BASCOM-AVR version : 2.0.8.5 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Thu Apr 28, 2022 2:18 pm    Post subject: Reply with quote

i will have a look. it is either a bug or not all timers are simulated. i get back on it.
_________________
Mark
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Fri Apr 29, 2022 11:42 am    Post subject: Reply with quote

timer 3 is not implemented for simulation.
timer 0 is, but a different model is used.
there are many different timers in the AVR. And they are not all implemented.
I will add a remark to the help and schedule a rewrite for the simulation of timers.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum