8085 Microcontroller

55
EC8511: MICROCONTROLLER AND INTERFACING LABORATORY Presentation Slides: www.sathieshkumar.com/tutorials Presented By, Dr. V. Sathiesh Kumar Dr. V. SATHIESH KUMAR Department of Electronics, MIT 1 Overview 1. Architecture and pin details of 8085 2. Basic assembly language programs 3. 8255-Programmable peripheral interface 4. Stepper Motor Interfacing 5. Traffic Light Control System 6. DAC Interface using DAC0800 7. ADC Interface using ADC0804 Dr. V. Sathiesh Kumar Department of Electronics, MIT-Anna University

description

8085 microcontroller

Transcript of 8085 Microcontroller

EC8511: MICROCONTROLLER AND INTERFACING LABORATORYPresentation Slides:www.sathieshkumar.com/tutorialsPresented By,Dr. V. Sathiesh Kumar Dr. V. SATHIESH KUMAR Department of Electronics, MIT1Overview1. Architecture and pin details of 80852. Basic assembly language programs3. 8255-Programmable peripheral interface4. Stepper Motor Interfacing5. Traffic Light Control System6. DAC Interface using DAC08007. ADC Interface using ADC0804Dr. V. Sathiesh Kumar Department of Electronics,MIT-Anna UniversityEC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Features:1. It is a 8-bit microprocessor.2. 40-pin ceramic DIP.3. It is manufactured with N-MOS technology.4. It has 16 bit address bus and hence can address up to 216=65536 bytes of memory locations through A0-A15 address lines.5. The first 8 lines of address bus and 8 lines of data bus are multiplexed AD0-AD7.6. Data bus is a group of 8 lines D0-D7.Dr. V. SATHIESH KUMAR Department of Electronics, MIT26. Data bus is a group of 8 lines D0-D7.7. It supports external interrupt request.8. A 16-bit program counter (PC) and 16-bit Stack pointer (SP).9. Six 8-bit general purpose registers arranged in pairs: BC, DE, HL.10. It requires a signal +5 V power supply and operates at 6.144 MHz single phase clock. 11. Program, data and stack memories occupy the same memory space. The total addressable memory size is 64 KB.EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Features:12. The processor always uses 16-bit addresses, so that data can be placed anywhere.13. Stack memory is limited only by the size of memory. Stack grows downward.14. First 64 bytes in a zero memory page should be reserved for vectors used by RST instructions.Dr. V. SATHIESH KUMAR Department of Electronics, MIT3EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Pin Details:Dr. V. SATHIESH KUMAR Department of Electronics, MIT4EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Pin Details:Dr. V. SATHIESH KUMAR Department of Electronics, MIT5EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Pin Details: RESET IN: When this signal goes low, the program counter (PC ) is set to zero, microprocessor is reset and rests the interrupt enable and HLDA flip-flops. RESET OUT: This signal indicates the microprocessor is reset. This signal can be used to reset other devices. The signal is synchronized to the processor clock and lasts an integral number of clock periods. SID (Serial Input Data Line): The data on this line is loaded into accumulator bit 7 whenever a RIM instruction is executed.Dr. V. SATHIESH KUMAR Department of Electronics, MIT6whenever a RIM instruction is executed. SOD (Serial Output Data Line): The SIM instruction loads the value of bit 7 of the accumulator into SOD latch if bit 6 (SOE) of the accumulator is 1. HOLD: Indicates that another master is requesting the use of the address and data busses. The CPU, upon receiving the hold request, will relinquish the use of the bus as soon as the completion of the current bus transfer. Internal processing can continue. The processor can regain the bus only after the HOLD is removed. When HOLD is acknowledged, the Address, Data, RD, WR and IO/M lines are tristated.EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Pin Details: HLDA (Hold Acknowledge): Indicated that the CPU has received the HOLD request and that it will relinquish the bus in the next clock cycle. HLDA goes low after the HOLD request is removed. READY: This signal synchronizes the fast CPU and the slow memory, peripherals. If READY is high during a read or write cycle, it indicates that the memory or peripheral is ready to send or receive data. If READY is low, the CPU will wait an integral number of clock cycle for READY to go high before completing the read or write cycle.Dr. V. SATHIESH KUMAR Department of Electronics, MIT7clock cycle for READY to go high before completing the read or write cycle.EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Architecture:Dr. V. SATHIESH KUMAR Department of Electronics, MIT8EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Architecture:Dr. V. SATHIESH KUMAR Department of Electronics, MIT9EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Microprocessor Architecture: Accumulator or Aregister isan8-bit register usedfor arithmetic, logic, I/Oandload/store operations. Flag register has five 1-bit flags. Sign flag: Set if the MSB of the result is set. Zero flag: Set if the result is zero. Auxiliary carry: Set if there was a carry out from bit 3 to bit 4 of the result. Parity: Set if the parity (the number of set bits in the result) is even.Dr. V. SATHIESH KUMAR Department of Electronics, MIT10 Parity: Set if the parity (the number of set bits in the result) is even. Carry flag: Set if there was a carry during addition or borrow duringsubtraction/comparison/rotation. Stack pointer (SP): It is a 16-bit register, points to the top of the stack. This register isalways decremented/incremented by 2 during push and pop instructions. Programcounter(PC): It isa16-bit register, pointstothenext instructiontobeexecuted.EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Instruction Set: Data moving instructions Arithmetic- Add, Subtract, Increment and Decrement functions Logic- AND, OR, XOR and rotate Control transfer- Conditional and unconditional programbranch, Conditional andunconditional call subroutines, Conditional and unconditional return from subroutines. Input/Output instructions Others- Setting/Clearing flag bits, Enabling/Disabling interrupts, Stack operations etc.Dr. V. SATHIESH KUMAR Department of Electronics, MIT11 Others- Setting/Clearing flag bits, Enabling/Disabling interrupts, Stack operations etc.EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Addressing Modes: Register- References the data in a register or in a register pair Registerindirect- Instructionspecifiesregister pair containingaddress, wherethedata is located. Direct, Immediate- 8 or 16-bit data.Dr. V. SATHIESH KUMAR Department of Electronics, MIT12EC8511: MICROCONTROLLER INTERFACING LABORATORY8085 Programming: Addition of two 8-bit numbers# BEGIN 8000H //OpcodesMVI C,00 //0E 00 //C