THE 8085 MPU

The Microprocessor is a programmable logic device,designed with registers, flip flops, and timing elements.The 8085 (8085A) is an 8 bit general purpose microprocessor capable of addressing 64K of memory.It has 40 pins ,requires a +5V single power supply, and can operate with a 3 MHz single phase clock.

The 8085 is a complex IC of sequential circuits. The sequential circuits are designed to do some operation depending on what is the input on their lines. The vital inputs on the lines are what therefore determines what operation will be done by the sequential circuits inside it. The operations can be very complex and therefore this chip is also called a processor. Since we can find a way to put different values of inputs to the input lines of the processor at different times, we can make it execute different operations in a sequence that we desire. Thus, in other words we can make the processor execute a programme to do useful things for us. These inputs then could alternately, be called instructions. The inputs that we talked of so far are actually voltages to represent 1s and 0s. They can only be 1s or 0s, they are called digital values. The number of input lines that the processor provides are some estimation of the largeness of the instruction set that it can support.

The 8085 has a 8 bit input (actually called the input lines of the data bus), meaning that we could have only a maximum of 2^8=256 different combination of 1s and 0s as inputs to the processor. Well! The 8085 supports almost that many different instructions. The programme that we desire to be executed must be loaded into consecutive locations of memory chips. The memory is not part of the 8085 processor. The memory chips are again sequential circuits consisting of flip flops which are capable of storing digital values. Since we would be interested in storing a huge number of such digital values, a large number of these memories are packed together with a scheme of addresses, so that we can address them individually. Generally the memories are arranged in large numbers of 8 bit bunches each.

The addressing is also done by the voltages (1s or 0s) on the address bus. The 8085 has a address bus which is 16 bit wide. Therefore it can put 2^16 different digital values on it, and therefore it can address a maximum of 2^16 different address locations. This is called the addressing space and it is 64 kilobyte for the 8085, because 2^16= 65535. And then we ask the processor to execute those instructions from a particular memory location onwards. It goes on executing those instructions one after another. And that is all it does. The memory location from which it is to pick up the next instruction for execution is maintained in an internal memory location (Register) called Programme Counter (PC). As would be expected, it has to hold a 16 bit memory address. But we will always need to start from somewhere. As soon as the power is turned on, the 8085 does a reset of its programme counter. It is reset to 0000H ,on start up. After which it floats that value on the address bus. The address bus is connected in a parallel fashion to the entire memory. When the voltages on the address bus are indicating at 0000H, only that memory location is activated. And whatever is the content of that memory location is now floated on the data bus. The data bus feeds that value back to the processor 8085. This is also called a opcode fetch cycle. (an instruction fetch cycle). The 8085 executes that instruction and waits for the next instruction. Apart from executing instructions from consecutive memory locations, the processor can make changes in the value of the program counter itself so that it will fetch the next instruction from some other memory location. This is how jumps are executed. Your programme could also write to the memory locations whose address you specify. The processor uses certain internal memory locations called Registers in doing all the operations that we ask it to do. The contents of those memory locations can be directly altered by the instructions that we give. 


8085 Assembly Language Programming 

An Assembly Language Program is a set of instructions written in the mnemonics of a given microprocessor.These instructions are the commands to the microprocessor to be executed in the given sequence to accomplish a task.

1.Program to add two one byte numbers

2.Simulation of Stopclock

3.Simulation Of Throw Of Dice Using Interrupts


Program to add two one byte numbers

Address    Mneumonic    Hex Code  



F000                LXIH F100        21,00,F1
                        MOV A,M         7E
                        LXIH F101        21,01,F1
                        MOV B,M         46
                        ADD B               88
                        STA F102           32,02,F1
                        HLT                    76

Simulation of Stopclock

Address    Mneumonic    Hex Code  



F000                MVI A,18            3E,18
                        SIM                      30
                        EI                          FB
                        MVI A,00             3E,00
                        STA FFF8             32,F8,FF
F009             b:MVI B,00             06,00
                        MVIC,00              0E,00
F00D            r:MOVA,B              78
                        STA FFF7            32,F7,FF
                        MOV A,C            79
                        STA FFF9           32,F9,FF
                        PUSH B              C5
                        CALL UPDAT    CD,D3,06
                        CALL UPDAD   CD,BC,06
                        POP B                 C1
                        CALL :d              CD,3C,F0
                        MOV A,C            79
                        ADI 01                 C6,01
                        DAA                     27
                        MOV C,A             4F
                        CPI 60                  FE,60
                        JNZ :r                   C2,0D,F0
                        MOV A,B             78
                        ADI 01                  C6,01
                        DAA                      27
                        MOV B,A             47
                        CPI 60                  FE,60
                        JZ:b                       CA,09,F0
                        MVI C,00             0E,00
                        JMP:r                    C3,0D,F0
F03C            d:STANDARD DELAY PROGRAM
                        OR ANY OTHER DELAY PROGRAMS.
 

Simulation Of Throw Of Dice Using Interrupts

Address    Mneumonic    Hexcode  



F000                EI                        FB
                        MVI A,18            3E,18
                        SIM                     30
F004              r:MVI A,01           3E,01
F006              n:INR A                3C
                         CPI 06                FE,06
                         JNZ:n                 C2,06,F0
                         JMP:r                 C3,04,F0

FFB1                PUSH PSW        F5
                         STA FFF9           32,F9,FF
                         CALL UPDAT   CD,D3,06
                         POP PSW           F1
                         EI                        FB
                         RET                     C9 

 

8051 Microcontroller, The: Hardware, Software, and Interfacing by James W. Stewart, Kai X. Miao


Computer Organization - Introduction

8086 Microprocessor - Introduction

8086 Addressing Modes

8086 Assembly Language Programs


All the above Programs were executed on Intels SDK-85 Microprocessor Kit.
© Copyrights Madhu Sudan Rao G.K  

[CodeEverywhere]