Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

8051 Programs

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Subject MCA: Microcontroller 8051 assignment

Sr. No 1 Software Program Write an 8051 assembly language program to send a block of 8 bytes from the external memory (XDATA) out through the serial port UART. Hardware interfacing

6 7

10

A simple burglar alarm system has 4 zone inputs connected to an 8051 I/O port. If anyone of these inputs is activated a bell will sound for 5 minutes and the corresponding zone LED, or LEDS, will be activated. Write an ALP to move block of data bytes Interface seven segment displays with Port P2. Write present in internal memory with program to display number 0 to 9 on the seven segment Starting address 10h and ending address display at the interval of 1 second 20h to the destination memory with starting address 25h. Write an ALP to demonstrate call and Write a program to generate square wave of 50% duty return instruction using a program to cycle having frequency 5 KHz at port pin P1.0 using find factorial of a number. timer 1 in mode 2. Modify program to generate pulse waveform of 70%duty cycle using timer on the same pin. Write an ALP to convert hexadecimal Generate external interrupt INT0 and INT1 by number to its equivalent decimal connecting push button switch. Glow LEDs connected number. at port 1 one by one when interrupt INT0 occurs. LEDs should flash when interrupt INT1 occurs Write an ALP to convert decimal number Write a program to count external pulses given at the to its equivalent ASCII code. Also Write timer 0 input pin. Display pulses on the seven segment an ALP to convert ASCII code to its display equivalent decimal number. Write a 8051 ALP using Timer0 to create a Interface matrix keyboard with 8051. Write program to 10khz square wave on P1.0 display key pressed on seven segment display Write a program to Add block of data Interface ADC0808 with 89C51 microcontroller. Write stored at location 40h to 45h Program to read analog voltage applied at the input of Transfer block of data from the location ADC. Display it on LCD. 40h-4Fh to external memory location 2000h-200Fh Arrange data stored at the location 40h-4Fh in ascending order Write an ALP to illustrate addition, Interface 8 bit DAC chip with 89C51 microcontroller. subtraction, multiplication and division of Write a two 8 bit numbers. program to generate sine wave using look up table Write an ALP to exchange block of data Write and execute programs bytes present in external memory. Flash LEDs connected at Port Pin P1.4 to P1.7 Starting address of first is 8000h and Monitor switch connected at P1.0, Glow all LED when starting address of other block 9000h switch in ON Monitor switch connected at P1.1, send and size of array is 10h. pulses to port P1.7 when switch is ON Write an ALP to sort a given array present Program to transfer a data serially from one in external memory with a starting microcontroller to another. address 9000h and size of an array is 10h using bubble sort technique.
Faculty: Mr. Kondekar V.H. Page 1

TE E&TC Shift II

Subject MCA: Microcontroller 8051 assignment


11 Write a program to send the message The Earth is but One Country to serial port. Assume a SW is connected to pin P1.2. Monitor its status and set the baud rate as follows: SW = 4800 baud rate SW = 9600 baud rate Assume XTAL = 11.0592 MHz, 8-bit data, and 1 stop bit. Write an ALP to Generate square wave, rising ramp, falling ramp and Illustrate logical operations like AND, OR, triangular wave signal using DAC interfacing NOT and XOR Illustrate signed and unsigned arithmetic. ) Write a program to perform the following: Write a program for as to toggle all the (a) Keep monitoring the P1.2 bit until it becomes high bits of P0, P1, and P2 every 1/4 of a (b) When P1.2 becomes high, write value 45H to port 0 second (c) Send a high-to-low (H-to-L) pulse to P2.3 Write an ALP to find largest element in a given array present in external memory with a starting address 9000h and size of an array is 10h. Write a program to get the x value from P1 A switch is connected to pin P1.7. Write a program to and send x2 to P2, check the status continuously of the switch and make the following decision. (a) If SW = 0, send 0 to P2 (b) If SW = 1, send 1 to P2 Write a program that continuously get 8-bit Write a program for the 8051 to transfer YES serially data from P0 and sends it to P1 while at 9600 baud, 8-bit data, 1 stop bit, do this continuously simultaneously creating a square wave of 200 s period on pin P2.1. Use timer 0 to create the square wave. Assume that XTAL = 11.0592 MHz. Make an hardware to drive motor thorough relay using Write a program to generate & store Fibonacci Series, which are less than FFh Switches for control direction and on/off , LED to indicate on/off status and Buzzer should be on when direction change is observed.

12

13

14

15

16

TE E&TC Shift II

Faculty: Mr. Kondekar V.H.

Page 2

You might also like