This program configures Timer 0 of the microcontroller to operate in 16-bit mode 1 and loads the timer's high and low bytes with initial values of 0. It then sets a pin high, starts the timer running, continuously reads the timer's low byte in a loop until the timer overflow flag is set, stops the timer, clears the overflow flag, and repeats the process.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
134 views1 page
8051 Counter Code in Assembly Language
This program configures Timer 0 of the microcontroller to operate in 16-bit mode 1 and loads the timer's high and low bytes with initial values of 0. It then sets a pin high, starts the timer running, continuously reads the timer's low byte in a loop until the timer overflow flag is set, stops the timer, clears the overflow flag, and repeats the process.