8051 Timer interrupts
2016-08-23
1 0 0
no vote
Other
Earn points
Using 8051 Timer as interrupts, code written in Embedded C.
This example program shows how to configure timer/counter 0 as a 16-bit timer. An interrupt service routine (ISR) is invoked each time the timer overflows (goes from 0xFFFF to 0x0000). In the ISR, the overflow_countvariable increments.
To test this program...
Start the debugger.
Set a breakpoint on the overflow_count++ line in the ISR.
Run the program.
Each time the interrupt routine is invoked, the debugger stops running the program. Position the cursor over theoverflow_count variable to view its current value.
This example program shows how to configure timer/counter 0 as a 16-bit timer. An interrupt service routine (ISR) is invoked each time the timer overflows (goes from 0xFFFF to 0x0000). In the ISR, the overflow_countvariable increments.
To test this program...
Start the debugger.
Set a breakpoint on the overflow_count++ line in the ISR.
Run the program.
Each time the interrupt routine is invoked, the debugger stops running the program. Position the cursor over theoverflow_count variable to view its current value.
c
Related Source Codes
PClite
0
0
no vote
generic embeded FTP Client
0
0
no vote
UDP Test Demo
0
0
no vote
TMS320F28335 DSP transmits data to EEPROM through
0
0
no vote
TMS320F28335 CAN communication source code
0
0
no vote
No comment