Sie sind auf Seite 1von 2

EE2106 Microprocessor Theory and Laboratory

Assembly Language Programming Exercises


Week 1
• Divide an 8-bit variable into two 4 bit nibbles and store one nibble in each byte of a 16 bit
variable. Store the disassembled byte in memory location (pointed by result).
• Compare 2 values stored in memory location and store the higher value in a memory
location (pointed by result).
• Write a program to add two 64-bit numbers and store the result in a memory location.
• Add a series of 16-bit numbers stored in sequential location in memory (called Table) and
store the result in memory.
• Find the factorial of a given number

Week 2
• Write an even parity generator and checker for 32-bit number.

• Convert a decimal number to seven segment binary using a look-up table.

• Write an assembly language program using the ARM instuction set to find the largest in a series
of numbers stored in memory. Store the largest number in a memory location.

• Copy a block of 16 bit numbers from the CODE area to DATA area (Use LDMIA and STMIA
instruction).

• Write a program to determine the Fibonacci series.

Hardware Experiments
Week 3
• Write a program in C for the ARM processor to read data from the 8-bit onboard DIP
switch and display the value on the 8 LEDs.
• Write a program in C for the ARM processor to use the built in DAC to generate the
following waveforms - square, ramp, triangle and sine.

Week 4
• Write a program in C for the ARM processor to rotate the stepper motor in both
directions.
• Establish serial communication between the ARM kit and the PC and do the following:
• Send a character from the ARM kit to the serial terminal on the PC
• Send a character from the PC to the ARM Kit and display it on the LED
• Send a character from the PC to the ARM Kit. The program on the ARM processor
should add 2 to it and send it back to the PC
Week 5
• Use the on-chip ADC to digitize the given analog signal and display it on the LED. Also
send the digitised value to the PC through serial port.
• Read the key pressed on the keypad matrix and display it on the LEDs.

Week 6
• Use the I2C bus to implement a decimal counter on the single 7-segment display.
• Use PWM to control the brightness of an LED.

Week 7
• Use the timer on the ARM processor to implement a 1 Hz clock. Use the timer interrupt
to increment the 7-segment display after each clock cycle.

Week 8
• Write a program to rotate a stepper motor according to given step angle.
• Write a program to use the potentiometer input to control the position of the stepper
motor. For instance, if the potentiometer is rotated in the clockwise direction, the
stepper motor should also rotate in the same direction proportional to the
potentiometer movement.

Week 9
• Write a program to utilize external port interrupt priority.
• Use switch press to increment counter on 7-segment display.
• Design a system with 2 interrupts that will function based on switch-press input. The
first interrupt will make a LED blink for 5 seconds in 1-s intervals and the second will
cause a buzzer to beep for 5 seconds in 1-s intervals.

Week 10
• Write a program to display potentiometer input on the oscilloscope.

Das könnte Ihnen auch gefallen