Vous êtes sur la page 1sur 1

Homework 1 School: LST Course No: ECE310 Course Title: Microcontroller PART-A 1.

Explain different types of addressing modes of 8051 microcontroller? PART-B 1. Subtract two 16 bit numbers? 2. Calculate the sum of series of odd numbers? 3. Find the division of given numbers? (without using DIV instruction) PART-C 1. Find the sum of the values 82H, 92H, E2H, and F9. Put the sum in registers R1 and R7 of bank 3 and bank 2.Show flag status also? 2. Write a program to copy the value FFH into RAM locations 70H to 65H and 45H to 50H using a) Direct addressing mode b) Register indirect addressing mode 3. Write a program to monitor P2.3 continuously. a) If p2.3 is high then count no. of 0s in a number (R2) b) Else reset P2.3 and add following data in a manner that first byte of data 1 should add with last byte of data 2 and so on data1---22, 25, 28,34,36,28 data 2---38,89,92,35,39,34 --------if two times carry exists than load the output addition in RAM location (40H-45H). --------else clear RAM locations (40H-45H) and (60H-67H).

Vous aimerez peut-être aussi