0
75kviews
Program timer 1 of 8051 to generate 1 KHz square wave on P2.1 using mode 1. Assume crystal frequency to 12 MHz.
1 Answer
2
7.2kviews

frequency = 1KHz

1 pulse = 1/1KHz = 1 msec

500 μsec ON time and 500 μsec OFF line.

Crystal Frequency = 12MHz

1 clock pulse = 1μsec.

Count = 500μsec/1μsec = 500

Counter initial value = 65536 - 500 = 65036 = FE0C

TMOD

Gate C/T M1 M0 Gate …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.