0% found this document useful (0 votes)
6 views

Week 10 Timer_counter 3

The document contains example questions and answers related to programming the 8051 microcontroller in C. It includes tasks for toggling bits on port P2, generating a frequency on pin P2.7, and using counters in different modes to display counts on specific ports. Each question specifies the mode and timing requirements for the respective tasks.

Uploaded by

nrztymhd
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
6 views

Week 10 Timer_counter 3

The document contains example questions and answers related to programming the 8051 microcontroller in C. It includes tasks for toggling bits on port P2, generating a frequency on pin P2.7, and using counters in different modes to display counts on specific ports. Each question specifies the mode and timing requirements for the respective tasks.

Uploaded by

nrztymhd
Copyright
© © All Rights Reserved
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
You are on page 1/ 4

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

You might also like