Digital Assignment I
Digital Assignment I
1. Write an 8051 assembly language program to implement a counter for counting pulses of an
input signals received from the Port Pin P3.4. Assume the crystal frequency as 33 MHz.
Configure TIMER 0 to generate a clock pulse for every one seconds at Port Pin P3.4 and
TIMER 1 as a counter which receives input pulses at P3.5 from P3.4. Display final count
values in Port P7 (TL1) & P7 (TH1).
2. Assume that the 8051 microcontroller serial port is connected to the COM port of a
Computer System (PC) and the Port P1 and P2 of the 8051 are connected to the LEDs and
Switches, respectively. Write an 8051 assembly language program to the following tasks:
(ii) Receive any data sent by the PC and put it on the LEDs connected to the Port P1
(iii)Get the data on the Switches connected to the Port P2 and send it to the PC
serially
The program should perform part (i) once, but parts (ii) and (iii) continuously, use 4800
baud rate.
Note:
This is an individual (NOT a Group) assignment
Copying from another student may result in you receiving a mark of zero for the
portion affected