| ??? 11/01/98 19:30 Read: times |
#28 - RE: Timer Written C |
Set timer mode to mode 2 (8-bit autoreload). Calculate the reload value to put into timer holding register, enable interrupts and start timer.
There is an example (only the principles): void timer1_interrupt () using 1 { // your small portition of interrupt code here } main () { TMOD = 0x02; // T0 - mode 2 TH0 = -84; // set reload value for 22 kHz ET0 = 1; // enable timer 0 interr. EA = 1; // enable all interrupts TR0 = 1; // start timer 0 // your main program code } |
| Topic | Author | Date |
| Timer Written C | 01/01/70 00:00 | |
| RE: Timer Written C | 01/01/70 00:00 | |
RE: Timer Written C | 01/01/70 00:00 |



