Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

timer2 Capture calculation

 
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-8051 Archive
View previous topic :: View next topic  
Author Message
mtheriault

Bascom Member



Joined: 01 Feb 2005
Posts: 2

blank.gif
PostPosted: Thu Aug 31, 2006 3:52 pm    Post subject: timer2 Capture calculation Reply with quote

Hello

I want to use the timer2 as a time base for my system. I need an interrupt every 50 milisecond. What will be the capture value if i use a 10 mhz crystal

Dim capture as Integer
Capture = XXXXX
Config Timer2 , = Timer , Gate = Internal , Mode = 0 , Direction = Down
On Timer2 Timer2_int
Load Timer2 , capture ' Interrupt arrive lorsque capture= 0
Enable Interrupts
Enable Timer2


Any help will be appreciated

M. Theriault
Montreal, Canada
Back to top
View user's profile
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-8051 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