Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views4 pages

Programs List MC Modified

The document outlines various microcontroller lab programs to illustrate addressing modes, data transfer instructions, arithmetic instructions, boolean/logical instructions, conditional calls and returns, code conversion, delays, and interfacing programs including DAC, stepper motor, elevator, LCD, seven segment, keyboard, ADC, DC motor, and temperature control.

Uploaded by

Poornima Gn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Programs List MC Modified

The document outlines various microcontroller lab programs to illustrate addressing modes, data transfer instructions, arithmetic instructions, boolean/logical instructions, conditional calls and returns, code conversion, delays, and interfacing programs including DAC, stepper motor, elevator, LCD, seven segment, keyboard, ADC, DC motor, and temperature control.

Uploaded by

Poornima Gn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

MICROCONTROLLER LAB (10ESL47)

I) PROGRAMMING :
Programs to illustrate various Addressing Modes:
1. Write an 8051 ALP to load an 8-bit/16-bit data to various registers using immediate
addressing mode.
2. Write an 8051 ALP to load accumulator with an 8-bit data and hence transfer the same to
various registers using register addressing mode.
3. Write an 8051 ALP to load an 8-bit data to internal RAM location and hence transfer the
same to five successive memory locations in internal RAM using direct addressing mode.
4. Write an 8051 ALP to load accumulator with 8-bit data and hence transfer the same to
five successive memory locations in internal RAM using indirect addressing mode.

Programs using Data Transfer Instructions:


1. Write an 8051 ALP to move a data from one source memory location to destination
memory location.
2. Write an 8051 ALP to move a block of data from source memory location to destination
memory location: (i) Source and Destination are Internal RAM (ii) Source is Internal
RAM and Destination is External RAM (iii) Source is External RAM and Destination is
Internal RAM (iv) Source is ROM and Destination is Internal RAM (v) using PUSH and
POP instructions when both Source and Destination are Internal RAM
3. Write an 8051 ALP to interchange the contents of two memory locations (i) without
using XCH instruction (ii) using XCH instruction.
4. Write an 8051 ALP to interchange the contents of two blocks of memory locations:
(i) Both are Internal RAM (ii) One is Internal RAM and other is External RAM
5. Write an 8051 (i) search the given data in the given array (ii) Frequency of occurrence
(iii) to find the position/location of the data.
6. Write and 8051 ALP to find the smallest of a given array of data.
7. Write and 8051 ALP to find the largest of a given array of data.
8. Write an 8051 ALP to sort the given array in ascending order.
9. Write an 8051 ALP to sort the given array in descending order.

Programs using Arithmetic Instructions:


1. Write an 8051 ALP to add two 8-bit numbers stored in registers/memory.
2. Write an 8051 ALP to add two 16-bit numbers stored in registers/memory.
3. Write an 8051 ALP to add two n-byte/n-bit numbers stored in internal memory and
stored the sum in internal/external memory.
4. Write an 8051 ALP to add two 2-digit/n-digit BCD numbers.
5. Write an 8051 ALP to find difference between two 8-bit numbers stored in
registers/memory.
6. Write an 8051 ALP to add find difference between two 16-bit numbers stored in
registers/memory.
7. Write an 8051 ALP to multiply two 8-bit numbers stored in registers/memory.
8. Write an 8051 ALP to multiply a 16-bit number by an 8-bit number.
9. Write an 8051 ALP to multiply two 16-bit numbers.

EC dept, BIET, Davangere Page 1


10. Write an 8051 ALP to find square of a given 8-bit/16-bit number.
11. Write an 8051 ALP to find cube of a given 8-bit number.
12. Write an 8051 ALP to divide an 8-bit number by an 8-bit number.
13. Write an 8051 ALP to find average of given array of data bytes.

Programs to implement counters:


1. Write an 8051 ALP to implement 8-bit hexadecimal up counter.
2. Write an 8051 ALP to implement 8-bit hexadecimal down counter.
3. Write an 8051 ALP to implement 8-bit hexadecimal up/down counter.
4. Write an 8051 ALP to implement 8-bit decimal up counter.
5. Write an 8051 ALP to implement 8-bit decimal down counter.
6. Write an 8051 ALP to implement 8-bit decimal up/down counter.
7. Write an 8051 ALP to implement 8-bit octal up counter.
8. Write an 8051 ALP to implement 8-bit octal down counter.
9. Write an 8051 ALP to implement 8-bit octal up/down counter.
10. Write an 8051 ALP to implement 8-bit hexadecimal/decimal counter.

Programs using Boolean/Logical Instructions:


1. Write an 8051 ALP to mask the lower/higher nibble of given data.
2. Write and 8051 ALP to set the bits in given data.
3. Write an 8051 ALP to complement the bits in given data.
4. Write an 8051 ALP to illustrate XOR operation.
5. Write an 8051 ALP to interchange the digits in given data using SWAP instruction.
6. Write an 8051 ALP to interchange the digits in given data without using SWAP
instruction.
7. Write an 8051 ALP to check whether given data byte is even or odd.
8. Write an 8051 ALP to check whether given data byte is positive or negative.
9. Write an 8051 ALP to check whether given data byte is palindrome or not.
10. Write an 8051 ALP to check whether given array is palindrome or not.
11. Write an 8051 ALP to separate even and odd numbers in a given array.
12. Write an 8051 ALP to separate positive and negative numbers in a given array.

Programs to illustrate conditional CALL & RETURN Instructions:


1. Write an 8051 ALP to illustrate conditional CALL & RETURN Instructions.

2. Write an 8051 ALP to find LCM of given two data bytes.


3. Write an 8051 ALP to find HCF of given two data bytes.
4. Write an 8051 ALP to find factorial of given data byte.
5. Write an 8051 ALP to check whether given data byte is prime or not.

Programs to perform Code Conversion:


1. Write an 8051 ALP to convert given BCD value into its equivalent ASCII value.
2. Write an 8051 ALP to convert given ASCII value into its equivalent BCD value.
3. Write an 8051 ALP to convert given ASCII value into its equivalent
HEXADECIMAL value.

EC dept, BIET, Davangere Page 2


4. Write an 8051 ALP to convert given HEXADECIMAL value into its equivalent
ASCII value.
5. Write an 8051 ALP to convert given HEXADECIMAL value into its equivalent
DECIMAL value.
6. Write an 8051 ALP to convert given DECIMAL value into its equivalent
HEXADECIMAL value.
7. Write an 8051 ALP to convert given BCD value into its equivalent 7-segment code.

Programs to generate delay:


1. Write an 8051 ALP to generate a delay of given duration using registers.
2. Write an 8051 ALP to generate a delay of given duration using timer.
3. Write an 8051 ALP to generate a delay of given duration using timer and interrupt.

4. Write an 8051 ALP to read a data through serial port.


5. Write an 8051 ALP to write a data to serial port.

II) INTERFACING :
DAC Interface:
1. Write a ‘C’ program to generate a square wave of given amplitude and given frequency.
2. Write a ‘C’ program to generate a positive/negative going sawtooth waveform of given
amplitude.
3. Write a ‘C’ program to generate a sine wave of given amplitude.
4. Write a ‘C’ program to generate triangular waveform of given amplitude.
5. Write a ’C’ program to generate a staircase waveform of given step size and width.
6. Write a ‘C’ program to generate a random waveform.

STEPPER MOTOR Interface:


1. Write a ‘C’ program to rotate stepper motor in clockwise direction.
2. Write a ‘C’ program to rotate stepper motor in anticlockwise direction.
3. Write a ‘C’ program to rotate stepper motor in clockwise/anticlockwise direction.
4. Write a ‘C’ program to rotate stepper motor for a specified angle/steps.
5. Write a ‘C’ program to rotate stepper motor with given speed.
6. Write a ‘C’ program to rotate stepper motor for given number of rotations.

ELEVATOR Interface:
1. Write a ‘C’ program to simulate elevator operation.
2. Write a ‘C’ program to simulate elevator operation for specified priority level.

LCD Interface:
1. Write a ‘C’ program to display a string using LCD interface.
2. Write a ‘C’ program to display alternate text using LCD interface.
3. Write a ‘C’ program to display a blinking text using LCD interface.
4. Write a ‘C’ program to implement real time clock using LCD interface.
5. Write a ‘C’ program to display the key pressed using LCD/KEYBOARD interface.

EC dept, BIET, Davangere Page 3


6. Write a ‘C’ program to implement single digit simple calculator using
LCD/KEYBOARD interface.

SEVEN SEGMENT/KEYBOARD Interface:


1. Write a ‘C’ program to detect the key pressed and display it on seven segment display.
2. Write a ‘C’ program to implement a calculator using keyboard and seven segment display
interface.

ADC Interface:
DC Motor Control Interface:
Temperature Control Interface:

EC dept, BIET, Davangere Page 4

You might also like