Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

C51: Timer 2 as 5 sec timer (4 Replies)

$
0
0
Greetings everybody, I am working on a project of making a timer which runs for 5 seconds and stops. I have selected timer 2 for this. I start the timer on key press and it runs for 5 seconds. Below is the code for initializing the timer 2 void _init_timer(void) { T2CON = 0x80; /* 10000000 */ /*-------------------------------------- Overflow at every 10 ms. --------------------------------------*/ RCAP2H = 216;

Viewing all articles
Browse latest Browse all 3049