Week 10 Timer_counter 3
Week 10 Timer_counter 3
• Example Question
1. Develop an 8051 C program to toggle all the bits of
port P2
continuously every 500 ms. Use Timer 1, mode 1
generate
the delay.
a. toggle all the bits of port P2
b. every 500 ms
c. Timer 1
a. mode 1
answer • Example Question
1. Develop an 8051 C program to create a frequency
of 2500
Hz on Pin P2.7. Use timer 1, Mode 2 to create the
delay
Assume that a 1-Hz external clock is
being fed into pin T1 (P3.5). Write a C
answer counter 1 mode 2
counter 0
mode 1