You are on page 1of 56

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

INDEX
Sr. No.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

Title
Introduction to DYNA-8085 microprocessor kit & its features Programming problems on Data Transfer Programming problems on Arithmetic Operations Programming problems on Looping techniques Programming problems on Time Delay and Counters Programming problems on Stack, Subroutines and Interrupts To interface 8255 study card with 8085 microprocessor To interface 8253 study card with 8085 microprocessor To interface 8257 study card with 8085 microprocessor To interface 8259 study card with 8085 microprocessor To interface Traffic Control study card with 8085 microprocessor

Page no.

Grade Signature

[3]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

EXPERIMENT-01 Introduction to DYNA-8085 microprocessor kit & its features


INTRODUCTION TO DYNA 8085: Microfriend DYNA-85 is an introduction to a low cost trainer and development kit. It is a single board computer based on 8085 CPU designed specially for training applications. SYSTEM HARDWARE OVERVIEW CENTRAL PROCESSING UNIT It is based on the INTEL 8085 high performance CPU operating at 3 MHz MEMORY MAP: The DYNA-85 has a flexible memory map, and the RAM has battery back-up. 0000H to 3FFFH: This is monitor EPROM socket. 2732,2764 or 27128 can be used for EPROM. If 2732 is used then remaining part will be mapped. 4000H to BFFFH: This is socket is used for expansion of EPROM or RAM. C000H to FFFFH: User RAM socket. POWER SUPPLY SPECIFICATIONS ( SMPS): Voltage +5 V +12 V -12 V Current rating 1A 500mA 250mA

[4]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

KEYPAD :

[5]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[6]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[7]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-02

Grade:

PROGRAMMING PROBLEMS ON DATA TRANSFER


Solved Example Load the Accumulator with 05h and register B with 09h. Swap the contents of these registers using register C. Solution
Hex Code 3EH 05H 06H 09H 4FH 78H 41H EFH MOV C, A MOV A, B MOV B,C RST 5 Copy the contents of Acc in register C Copy the content of B to Acc. Copy the content of C to B Ends the program MVI B, 09H Load register B with immediate value 09h

Address 2000H 2001H 2002H 2003H 2004H 2005H 2006H 2006H

Label

Mnemonics MVI A, 05H

Comments Load Accumulator with immediate value 05h

[8]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Assignments 1. Load the content of the memory location 2100H directly to the accumulator then transfer it to register C. The contents of memory location 2100H is 05H. 2. Place 05H in Accumulator. Increment it by one and store result in the memory location 2400H. 3. Write ALP to copy the contents of sixteen byte memory location to another memory location. Source memory address = 2500H to 2515H Destination memory address = 2613H to 2628H 4. Write ALP to copy the contents of Accumulator to memory location 2400H to 2407H using register addressing mode.

[9]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[10]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[11]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[12]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[13]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-03

Grade:

PROGRAMMING PROBLEMS ON ARITHMETIC OPERATION


Solved Example Write a logical program to perform addition of two 8-bit numbers Solution
Hex Code 3EH 05H 06H 09H 80H 4FH EFH ADD B MOV C, A RST 5 Add the contents of Acc. & B. Result stored in Acc. Copy the contents of Acc in register C Ends the program MVI B, 09H Load Accumulator with immediate value 05h

Address 2000H 2001H 2002H 2003H 2004H 2005H 2006H

Label

Mnemonics MVI A, 05H

Comments Load Accumulator with immediate value 05h

[14]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Assignments 1. Load the register B with 05H and register C with 04H. Subtract the contents of register B from that of register C. Check the status of borrow flag. Load the register B with 03H, register D with 07H and register H with 04H. Add the contents of all and store the result in register C. Repeat the problem with content of register B = FAH. Check the status of carry flag. Memory location 2500H contains value 68H and memory location 2600H contains value 19H. Add these numbers and store the result in memory location 2700H. Memory location 2500H contains value 53H and memory location 2600H contains value 25H. Subtract these numbers and store the result in memory location 2700H. Multiply the contents of accumulator by 4 without using MUL instruction.

2.

3.

4.

5.

[15]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[16]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[17]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[18]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[19]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-04

Grade:

PROGRAMMING PROBLEMS ON LOOPING TECHNIQUE.


Solved Example Write a logical program to find the smallest number in the given array Solution
Address 2000H 2001H 2002H 2003H 2004H 2005H 2006H 2007H 2008H 2009H 2010H 2011H 2012H 2013H 2014H 2015H 2016H 2017H Hex Code 21H 00H 42H 46H 23H 7EH 05H 23H BEH DAH 14H 20H 7EH 35H C2H 07H 20H 32H AHEAD: LOOP: Label Mnemonics LXI H, 4200H MOV B, M INX H MOV A, M DCR B INX H CMP M JC AHEAD Comments Load HL pair with 4200 Address Load the count Increment memory location Set 1st element as smallest data Decrement count If A-reg < M, go to Ahead

MOV A,M DCR M JNZ LOOP

Set the new value as smallest Repeat comparisions till count = 0

STA 4300

Store the smallest value at 4300

[20]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Assignment 1. Write ALP to find the largest number from the given array. 2. Write ALP to sort the given array in ascending order. 3. Write ALP to sort the given array in descending order. 4. Write ALP to transfer the entire block of sixteen bytes of data stored at memory location 2090H to 29FH to a new memory location starting at 20C0H. 5. Write ALP to multiply the contents of Accumulator by 4 without using MUL instruction. 6. Write ALP to divide the contents of Accumulator by 4 without using DIV instruction.

[21]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[22]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[23]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[24]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[25]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-05

Grade:

PROGRAMMING PROBLEMS ON TIME DELAY AND COUNTER


Solved Example Write a logical program to generate 1 millisecond delay if the clock frequency is 4 MHz. Solution
Hex Code 0EH 8FH 0DH C2H 52H 20H

Address 2050H 2051H 2052H 2053H 2054H 2055H

Label DELAY: LOOP1:

Mnemonics MVI C, 8FH DCR C JNZ LOOP1

Comments Load C with value 8F Decrement C by 1 Continue loop until C = 0

Determining T-states of the delay routine


DELAY: LOOP1: Instruction MVI C, FFH DCR C JNZ LOOP1 T states 7 4 7/10

Total T-states = 7 + 142*(4+10) + 1*(4+7) = 2006


[26]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Assignment 1. Write an ALP to generate 10 ms time delay using register pair. 2. Write an ALP to generate 1 second time delay using loop within loop technique. 3. Write an ALP to setup DOWN counter from 0FH to00H. 4. Write an ALP to setup UP counter from 00H to0FH.

NOTE : Use clock frequency = 3.0mhz and show time delay calculations.

[27]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[28]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[29]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[30]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-06

Grade:

PROGRAMMING PROBLEMS ON STACK, SUBROUTINES & INTERRUPTS Solved Example Write a logical program to count from 00-99 (Upcounter) in BCD. Use subroutine to generate a delay of 1 second between counts Solution
Address 2050H 2051H 2052H 2053H 2054H 2055H 2056H 2057H 2058H 2059H 2060H 2061H 2062H 2300H 2301H 2302H 2304H 2305H Hex Code 3EH 00H F5H CDH 00H 23H F1H C6H 27H C3H 51H 20H 76H 01H 24H F4H 0BH 79H DELAY: Label START: RPT: Mnemonics MVI A, 00H PUSH PSW CALL DELAY POP PSW ADI O1H DAA JMP RPT Comments Load count as 00 PUSH Call DELAY subroutine POP Decimal adjust after addition Unconditional jump to RPT Halt execution Load HL pair with delay count Decrement count

HLT LXI B, F424H

WAIT:

DCX B MOV A, C [31]

2306H 2307H 2308H 2309H 2310H

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING B0H ORA B C2H JNZ WAIT Loop until B = 0 04H 23H C9H RET

Assignment 1. Write an ALP to demonstrate the effect of the following cases on zero flag. Load 00 in accumulator and check zero flag. Load 00 in accumulator, logically OR accumulator and then check zero flag. 2. Write an ALP to display HEX UP counter from 00H to 0FH. 3. Write an ALP to display HEX DOWN counter from 0FH to 00H.

[32]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[33]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[34]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[35]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature:

Grade:

EXPERIMENT-07 TO INTERFACE 8255 STUDY CARD WITH 8085 MICROPROCESSOR. 8255 Study Card: 1. This study card is interfaced with 8085 kit through 50 pin cable. 2. It consists of one 8255, with tags for all I/O ports, buffers to drive LEDs, Vcc and ground tags. 3. I/O addresses are as under Port A 30H, Port B 31H, Port C 32H, Control Reg. 33H. General Procedure: 1. Keep 8255 study card to the left side of the 8085 kit. 2. Connect 8255 card to 8085 kit through 50 pin cable. 3. Do not connect/remove card when power is ON. 4. Enter your program in RAM area (i.e. C000H ) for your experiment.
[36]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

5. Execute the program and check working of 8255. 6. Similarly check working of 8255 in different modes by writing programs for the same.

Programs 1. 8255 is configured in mode 0. Ports A,B,C are in mode 0. All the ports are in output mode and data is transmitted to the respective ports. Procedure : Check the status of LEDs after execution of program. 2. 8255 is configured in mode 0. Ports A,B,C are in mode 0. All the ports are in input mode and data from all the three ports are read and then stored in different registers. Procedure : Write data byte by connecting tags of LEDs with ground. Execute the program and check the status of registers. 3. 8255 is configured in BIT SET/RESET mode. Use bit PC7. Procedure : Check the status of LED-7 of port C (PC7) after execution of program.

[37]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[38]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[39]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[40]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[41]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature:

Grade:

EXPERIMENT-08 TO INTERFACE 8253 STUDY CARD WITH 8085 MICROPROCESSOR. 8253 Study Card: 1. This study card is interfaced with 8085 kit through 50 pin cable. 2. It consists of one 8253, with tags for all counters, buffers to drive LEDs, Vcc and ground tags. 3. I/O addresses are as under Counter 0 30H, Counter 1 31H, Counter 2 32H, Command port 33H. General Procedure: 1. Keep 8253 study card to the left side of the 8085 kit. 2. Connect 8253 card to 8085 kit through 50 pin cable. 3. Do not connect/remove card when power is ON. 4. Enter your program in RAM area (i.e. C000H ) for your experiment.
[42]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

5. Execute the program and check working of 8253. 6. Similarly check working of 8253 in different modes by writing programs for the same.

Programs 1) The counter is in mode 0, i.e. Interrupt on terminal count. Binary counter 0 is selected. Read /load lower 8-bits and then higher 8-bits. Procedure: Connect pulser key to clock, gate to Vcc, connect RST 6.5 to OUT 0 after executing the program and then press pulser key. Press the pulser key according to data and the interrupt service routine executes. 2) The counter is in mode 1, i.e. programmable one shot. Binary counter 0 is selected. Read /load lower 8-bits only. Procedure : Connect pulser key to clock, gate to ground. Execute the program. Connect the gate to Vcc through a tag and start giving the pulse. The output of the counter will go low for count period and then it begins to glow again. 3) The counter is in mode 2, i.e. rate generator. Binary counter 0 is selected. Read /load high order 8-bits only. Procedure : Connect clock 0 to pulser key. Check mode 2 operation.

[43]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

4) The counter is in mode 3, i.e. square wave generator. BCD counter 0 is selected, load lower 8-bit count first followed by higher 8-bit count. Procedure : Connect gate to low, execute the program and then make it high ( Vcc). Give clock pulses.

[44]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[45]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[46]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[47]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature:

Grade:

EXPERIMENT-09 TO INTERFACE 8257 STUDY CARD WITH 8085 MICROPROCESSOR. 8257 Study Card: 1. This study card is interfaced with 8085 kit through 50 pin cable. 2. It consists of two 8257, buffers to drive LEDs, Vcc and ground tags. 3. I/O addresses are as under Selection Address ADD_CH0 30H CNT_CH0 31H ADD_CH1 32H CNT_CH0 33H ADD_CH2 34H CNT_CH0 35H ADD_CH3 36H CNT_CH0 37H MODE_PORT 38H General Procedure:
[48]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

1. 2. 3. 4.

Keep 8257 study card to the left side of the 8085 kit. Connect 8257 card to 8085 kit through 50 pin cable. Do not connect/remove card when power is ON. Enter your program in RAM area (i.e. C000H ) for your experiment. 5. Execute the program and check working of 8257. 6. Similarly check working of 8257 in different modes by writing programs for the same.

Programs 1) To study 8257 in DMA read mode. 2) To study 8257 in DMA write mode.

[49]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[50]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[51]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-10

Grade:

TO INTERFACE 8259 STUDY CARD WITH 8085 MICROPROCESSOR. 8259 Study Card: 1. This study card is interfaced with 8085 kit through 50 pin cable. 2. It consists of two 8259, buffers to drive LEDs, Vcc and ground tags. 3. I/O addresses are as under ICW1-30H, ICW2-31H for master 8259 General Procedure: 1. 2. 3. 4. Keep 8259 study card to the left side of the 8085 kit. Connect 8259 card to 8085 kit through 50 pin cable. Do not connect/remove card when power is ON. Enter your program in RAM area (i.e. C000H ) for your experiment. 5. Execute the program and check working of 8259.
[52]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

6. Similarly check working of 8259 in different modes by writing programs for the same. Programs 1) To study 8259 in stand alone mode. Procedure : Check the status of LEDs after execution of program.

[53]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[54]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature: EXPERIMENT-11

Grade:

TO INTERFACE TRAFFIC CONTROL STUDY CARD WITH 8085 MICROPROCESSOR. Traffic Study Card: 1. This study card is interfaced with 8085 kit through 50 pin cable. 2. It consists of buffer, 4 latches and LEDs. 3. I/O addresses are as under Port 01 20H Port 02 28H Port 03 30H Port 04 38H General Procedure: 1. Keep Traffic control study card to the left side of the 8085 kit. 2. Connect Traffic control card to 8085 kit through 50 pin cable. 3. Do not connect/remove card when power is ON.
[55]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

4. Enter your program in RAM area (i.e. C000H) for your experiment. 5. Execute the program and check working of Traffic control. Programs 1) Operate port-01 in traffic control sequence.

[56]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

[57]

INDUS INSTITUTE OF ENGINEERING AND TECHNOLOGY MICROPROCESSOR AND INTERFACING

Date:

Signature:

Grade:

[58]

You might also like