Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

TIMER0, TIMER1, TIMER2 using the "NOSAVE"

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
radan

Bascom Member



Joined: 06 Jan 2007
Posts: 35

ukraine.gif
PostPosted: Tue Oct 22, 2013 6:29 am    Post subject: TIMER0, TIMER1, TIMER2 using the "NOSAVE" Reply with quote

How to enter and exit the interrupt TIMER0, TIMER1, TIMER2 using the "NOSAVE"?

(BASCOM-AVR version : 2.0.7.6 )
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5024
Location: Holland

blank.gif
PostPosted: Tue Oct 22, 2013 9:39 am    Post subject: Reply with quote

i think i do not understand the Q since the answer is : the same as without nosave.
on timer0 isr_timer0 nosave
enable timer0
enable interrupts
do

loop


isr_timer0:
'your code here but remember to save sreg and all regs you change when using nosave
'you find code in mcs.lib and other libs just look for RETI which is the return of an ISR
return

also notice in 2077 you can best use a sub routine :

declare sub myisr()
on timer0 myisr()
enable timer0
enable interrupts
do

loop

sub myisr()
'now you can have locals as well
local bSomeByte

End sub

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive 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