Sunteți pe pagina 1din 6

Faculty of Engineering -Ain-shams university 3 rd year computer and systems department

Microprocessor Assignments 1 ,2,3


Student/ Salem Ahmed Hassen section: 03

Assignment 1

.Write a program in assembly notation-

1) ADI


// Acc = Acc+ immediate data.


2) ADD



// D = Acc+B


3) DAD


//H&L = H&L + B&C


4) MOV


//D,E = D,E + B,C










5) ADD


//M2 = M1 + Acc





//M4 = M3 + B,C




-Write The program in Machine Language notations.

1) oxC6


2) ox80


3) ox09

4) ox62





5) ox86





-Indicate memory and registers contents.

AC=‘00110101’ , ‘01000110’

after 1 st instruction


AC=‘00110101’ , B=‘01000110’

after 2 nd


AC=‘01111011’ , D=‘01111011’ , B=‘01000110’ B=‘01000110’ , C=‘00000001’, H=‘00110101’ ,L=‘00000001’

after 3 rd


B=‘01000110’ , C=‘00000001’, H=‘01111011’ ,L=‘00000010’ B=‘01000110’ , C=‘00000001’, D=‘00110101’ ,E=‘00000001’ ,H=‘oxxx’ , L=‘oxxx’

after 4 th


B=‘01000110’ , C=‘00000001’, H=‘01111011’ ,L=‘00000010’, D=‘01111011’ ,E=‘ox20’

AC=‘01000110’ , M1=‘00000001’, M2=‘xxxxxxxx’

after 5 th


AC=‘01000111’ , M1=‘00000001’, M2=‘01000111’ M3=‘0100011000000001’, B=‘00110101’ ,C=‘00000001’ ,H=‘oxxx’ , L=‘oxxx’ ,


after 6 th


M3=‘0100011000000001’, B=‘00110101’ ,C=‘00000001’ , H=‘01111011’ , L=‘00000010’ ,


Assignment 3

DC Motor Controlling System using PIC IC 61F84A

Basic Idea:

There are two types of DC motors, unidirectional and bidirectional. Unidirectional rotates in only one direction and it is specially meant for some specific applications while the bidirectional can be rotated in the clock-wise or the anti-clockwise direction. This the most widely used for industrial applications. There are two parameters to be considered in controlling the movements of a DC motor.



The first thing that can be controlled in a motor is its direction of rotation. Direction of the motor can be controlled by controlling the polarity of the current flowing through it. Usually a DC motors are driven by famous H-Bridge circuits made up of either transistors or the buffers or any other suitable methods.

Controlling the speed of the motor is another important area to be considered. The speed of motor is directly proportional to the DC voltage applied across its terminals. Hence, if we control the voltage applied across its terminal we actually control its speed.

A PWM (Pulse Width Modulation) wave can be used to control the speed of the motor. Here the

average voltage given or the average current flowing through the motor will change depending on

the ON and OFF time of the pulses controlling the speed of the motor i.e wave controls its speed.

Advantages of using PIC over other controlling devices for controlling the DC motor are given below:

1. SPEED: The execution of an instruction in PIC IC is very fast (in micro seconds) and can be changed by changing the oscillator frequency. One instruction generally takes 0.2 microseconds.

The duty cycle of the

2. COMPACT: The PIC IC will make the hardware circuitry compact.

3. RISC PROCESSOR: The instruction set consists only 35 instructions.

4. EPROM PROGRAM MEMORY: Program can be modified and rewritten very easily.

5. INBUILT HARDWARE SUPPORT: Since PIC IC has inbuilt programmable timers, ports and interrupts, no extra hardware is needed.

6. POWERFUL OUTPUT PIN CONTROL: Output pins can be driven to high state, using a single instruction. The output pin can drive a load up to 25mA.

7. INBUILT I/O PORTS EXPANSIONS: This reduces the extra IC’s which are needed for port expansion and port can be expanded very easily.

8. INTEGRATION OF OPERATIONAL FEATURES: Power on reset and brown/out protection ensures that the chip operates only when the supply voltage is within specification. A watchdog timer resets PIC if the chip ever malfunctions and deviates from its normal operation.

The PIC microcontroller is the brain of the circuit controlling all actions to be done. Inputs are given to control the speed and direction of the motor. The PIC output controls the DC motor.

Automated multi-stored car parking system using intel 8051

Idea :Automatic multistoried car parking system helps to minimize the car parking area.

, it is become necessity to avoid the wastage of space . In places where more than 100 cars need to be parked, this system proves to be useful in reducing wastage of space using intel 8051 . This Automatic Car Parking System enables the parking of vehicles, floor after floor and thus reducing the space used. Here any number of cars can be parked according to the requirement. This makes the system modernized and even a space-saving one.

Main sections in this model are

3.1. Display section

3.2. Keyboard, indicator & Beeper section

3.3. Lift & motor section

3.4. Sensor section

3.5. LCD section

The 8051 microcontroller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751.

The features unique to microcontrollers:

1. Internal ROM and RAM

2. I/O ports with programmable pins

3. Timers and counters

4. Serial data communication

The 8051 architecture consists of these specific features:

1. 8 bit CPU with registers A and B

2. 16 bit PC &data pointer (DPTR)

3. 8 bit program status word (PSW)

4. 8 bit stack pointer(SP)

5. Internal ROM or EPROM (8751)of 0(8031)to 4k(8051)

6. Internal RAM of 128 bytes.

7. 4 register banks , each containing 8 registers

8. 80 bits of general purpose data memory

9. 32 input/output pins arranged as four 8 bit ports:P0-P3

10.Two 16 bit timer/counters:T0-T1 11.Two external and three internal interrupt sources 12.Oscillator and clock circuits

Assignment 2

The transitional shift of processors “Zilog Z80 - Intel 8086 – Motorola M68000 ”

Zilog Z80:

The Z80 offered many real improvements over the 8080, 16 registers (2 of them “index registers offering indexing capabilities and an interrupt-vector register and memory refresh register to provide special interrupt functions and dynamic memory capabilities.”)

it included a memory controller and 10 addressing modes

Less hardware required for power supply, clock generation and interface to memory and I/O A non maskable interrupt (NMI) which can be used to respond to power down situations and/or other high priority events (and allowing a minimalistic Z80 system to easily implement a two-level interrupt scheme in mode 1).

Intel 8086

16-bit microprocessor chip ,20-bit external address bus gave a 1 MB physical address space ,16-bit I/O addresses , performance better than 8080 “10 times approx.”

Motorola M68000

the first member of the successful 32-bit m68k family of microprocessors ,8-bit data bus and a smaller (20 bit) address bus. , 23-bit external address bus and two byte-select signals "replaced" A0. These 25 lines could therefore reach 16 MB of physical memory with byte resolution. Address storage and computation used 32 bits ,fairly low cost .