0
7.6kviews
Write a program to generate a rectangular wave of 1 Khz, having a 25% duty cycle from the TxD pin of 8051, using timer1. Assume XTAL of 12Mhz.
1 Answer
0
820views
                   MOV TMOD, #10H               ; timer1 set in mode1
     UP:           MOV TL1,  #06H               ; load lower byte of count 
                   MOV TH1,  #0FFH              ; load upper byte of count 
                   SETB      P3.1               ; Display 1 at Txd pin 
                   MOV TCON, #40H               ; Program TCON
     ON:           JNB TCON.7, ON               
                   CLR       P3.1               ; Clear Txd …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.