Uploaded by Bhumika

Embedded Programming Lab

advertisement
LIST OF EXPERIMENTS
EMBEDDED PROGRAMMING LAB
1. Aim: - Design applications using Embedded 8051 C programming for accessing Ports.
a) Write an Embedded C Programming for 8051 Microcontroller to Monitor 0 to 255
Characters in Port 1.
b) Write an Embedded C programme for 8051 Microcontroller to Monitor bit P1.5 If it is High
Send 55H to P0 Otherwise AAH to P0.
c) Write an Embedded C Programme to Monitor Buzzer. When Door is Open the Buzzer is
ON and when door is Closed the Buzzer should be OFF and Generate a Square Wave.
(Note: Buzzer Connected P1.7, Sensor is Connected to P1.6)
2. Aim: - Design applications using Embedded 8051 C programming for generating delays using
timer Mode 0, 1 and 2.
a)
Write an Embedded C programme in 8051 Microcontroller to toggle the pin P1.5
continuously every 2.5m sec and use Timer 0 and 13bit Mode to Generate The delay.
b)
Write an Embedded C programming 8051 Microcontroller to Generate a Square wave
with 2.5 ms delay. Use Timer 0 16-bit Mode to Generate Delay. (Toggle P2.3).
c)
Write an Embedded C programming 8051 Microcontroller to P1.5 with 0.25 ms Delay
using Timer 1, 8 bit Auto reload Mode.
3. Aim: - Design applications using Embedded 8051 C programming for generating delays using
timer Mode 3 and counters.
a)
Write an embedded C programme for 8051 Microcontroller to continuously Toggle P1.5
and P1.6 with Timer delay. Use timer 0, 8 bit Split Mode to Generate the Delay (TL0, TH0
Used as Timers).
b)
Write an embedded C programme for 8051 Microcontroller for Counter 0 and Mode 1 to
count pulses from P3.4 and display TH0 and TL0 on Port 2 and Port 1 Respectively.
c)
Write an embedded C programme for 8051 Microcontroller to toggle P1.5 continuously
with 0.25ms delay. Use Timer0 and 8 bit Split mode to Generate the delay and TL0 Used
as a Counter and TH0 used as a Timer.
4. Aim: - Design an application of LED Interfacing configurations using 8051 embedded
programming.
a)
Write an embedded C programme for 8051 Microcontroller for Blinking LED which is
Connected to P0.0 Pin for every 50ms by using Timer Interrupt. At the Same Time
Received data To be Displayed on LED Connected P0.1.
b)
Write an 8051 C program for an external interrupts INT0 (P3.2) and INT1(P3.3). A low
signal on these pins generates the corresponding interrupts causing to execute the
respective ISRs. Upon these interrupts an increment and decrement of count appears on
LEDs connected to port P0.
5. Aim: - Design an application to send characters serially using 8051 embedded programming.
a) Write an 8051 C Programme to transfer the letter ‘A’ serially at 4800 baud rate use 8 bit
data, 1 start bit and 1 stop bit.
b) Write an 8051 C Programme to transfer the Character “VIT-AP” serially at 9600 baud rates
use 8-bit data ,1 start bit and 1 stop bit.
6. Aim: - Design an application to send characters serially using serial interrupts by 8051
embedded programming.
a) Write an 8051 C programme to receive the a Letter Serially at 9600 baud rates to LEDs
Connected to port 0, use 8-bit data, 1 start bit, 1 stop bit and enable Serial Interrupt.
b) Write an 8051 C programme to receive the ASCII characters serially at 4800 baud rates to
port 0, use 8-bit data 1 start bit, stop bit.
7. Aim: - Design an application to interface seven segment displays to print 00 to 99 using 8051
embedded programming.
8. Aim: - Design an Embedded application using ESAMCB51 development board to Interface
16*2 LCD display and display Your name on Second line.
9. Aim: - Design an Embedded application using ESAMCB51 development board for rotating a
stepper motor in clockwise and in anticlockwise direction using the interrupt button P3.2
(INT0).
10. Aim: - Design a fork program in ubuntu Linux to understand the creation of child process
from parent process.
Download