answer
• 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
program for counter 1 in mode 2
(8-bit auto reload) to count up and display
the state of the TL1 count on P1. Start the
count at 0H.
Assume that a 1-Hz external
answer clock is being fed into pin T0
(P3.4). Write a C program for
counter 0 in mode 1 (16-bit) to
count the pulses and display the
state of the TH0 and TL0 registers
on P2 and P1, respectively.
counter 0
mode 1