how to use timer2 for AT89C51RD2

Status
Not open for further replies.

pardeep

Newbie level 4
Joined
Apr 25, 2005
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,327
interrupt using at89c51ed2

hi frnds
how to use timer2 for AT89C51RD2. i want to use this timer for TIME OUT for user response for my system.
 

Set Timer 2 to 16-bit Auto reload mode ..
se Timer2 interrupt and select a value for RCAP2L/RCAP2H that gives a nice timer "tick" - e.g. 10 ms would give you an interrupt rate of 100/s ..
Then you can count 100 interrupts to get 1/s or as much as you think the response time should be ..

More details on timer2 can be "extracted" from:
https://www.bipom.com/bashelp/timer2.htm

Regards,
IanP
 

    pardeep

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…