A Design Example A Programmable Calculator. Programmable Calculator Working in Exact Mode Receiving Program from RS232 Port Saving Programs using RS232.

Slides:



Advertisements
Similar presentations
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Advertisements

8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Parul Polytechnic Institute
8088/86 Microprocessors and Supporting Chips
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
A Design Example An Exact Calculator. Exact Calculator Manipulating Large Integer Values Operations: – +, -, *, /, %, And, Or, Xor, Not, Power Functions.
Design of Microprocessor-Based Systems Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology I/O System Design.
ECE 2211 Microprocessor and Interfacing Chapter 8 The 8088/8086 Microprocessors and their memory and I/O interfaces Br. Athaur Rahman Bin Najeeb Room.
Khaled A. Al-Utaibi 8086 Bus Design Khaled A. Al-Utaibi
Memory & IO Interfacing to CPU
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Programmable Interval Timer
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
Chapter 2 Number conversion (BCD) 8086 microprocessor Internal registers Making of Memory address.
Microprocessor and Microcontroller
Designing the 8086/8088 Microcomputer System
4-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Hardware Detail of Intel.
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Chapter 10 Hardware Details on the 8088 Objectives: The general specification on the 8088 microprocessors The processor’s control signal names and specifications.
Design of Microprocessor-Based Systems Hardware Detail of Intel 8088 Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology.
MICROPROCESSOR BASED SYSTEM DESIGN
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Microcomputer & Interfacing Lecture 2
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
MODES OF Details of Pins Pin 1 –Connected Ground Pins 2-16 –acts as both input/output. Outputs address at the first part of the cycle and outputs.
Memory interface Memory is a device to store data
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
به نام یکتای هستی بخش درس ریزپردازنده یک گروه دکتر ثنایی جلسه اول.
CPU Interfacing Memory.
8086/8088 Hardware Specifications A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
Wait states Wait states can be inserted into a bus cycle
ELEC4601 Microprocessor systems Lab 3 Tutorial
Input/Output Interface Circuits and LSI Peripheral Devices
MICROPROCESSORS AND APPLICATIONS
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Minimum System Requirements Clock Generator Memory Interfacing.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
MODES OF Details of Pins Pin 1GND –Connected Ground Pins 2-16 AD14-AD0–acts as both input/output. Outputs address at the first part of the cycle.
8279 KEYBOARD AND DISPLAY INTERFACING
A Design Example The Exact Calculator Software. Control Word For Display = 89H.
Chapter 11Chapter 12 Memory system designI/O system design Objectives: The importance of bus buffering How the 8088 addresses (accesses) memory - I/O ports.
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
8254 Timer.
80386DX. Features of 80386DX It supports 8/16/32 bit data operands It has 32-bit internal registers It supports 32-bit data bus and 32-bit non-multiplexed.
80386DX functional Block Diagram PIN Description Register set Flags Physical address space Data types.
8279 KEYBOARD AND DISPLAY INTERFACING
Block diagram of 8086.
8086/8088 Hardware Specifications. Objectives Describe the functions of all 8086/8088 pins Understand DC characteristics and fan out Using the clock generator.
8086 and families Features of Bit Microprocessor : is a 16bit processor. It’s ALU, internal registers works with 16bit binary word.
The 8085 Microprocessor Architecture. What 8085 meant for? 80 - year of invention bit processor 5 - uses +5V for power.
8085 Microprocessor: Architecture & Support Components.
Multiplex of Data and Address Lines in 8088 Address lines A0-A7 and Data lines D0-D7 are multiplexed in These lines are labelled as AD0-AD7. –By.
KEYBOARD/DISPLAY CONTROLLER - INTEL Features of 8279 The important features of 8279 are, Simultaneous keyboard and display operations. Scanned keyboard.
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
WEATHER MONITORING SYSTEM. User Requirements  Design a weather monitoring system that detects the following parameters  Temperature  Pressure  Relative.
Memory Interface EEE 365 [FALL 2014] LECTURER 12 ATANU K SAHA BRAC UNIVERSITY.
EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing
Introduction to the processor and its pin configuration
COURSE OUTCOMES OF Microprocessor and programming
8086 MICROPROCESSOR ARCHITECTURE & SEGMENTATION
EE3541 Introduction to Microprocessors
Basic Microprocessor Architecture
8086/8088 Hardware Specifications
..
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
8086 Features It is a 16 bit μp. It is manufactured with H-MOS technology has a 20 bit address bus can access up to 220 memory locations ( 1 MB)
第四章 80386的存贮器和输入/输出接口 作业:P335 5,7,13,17,21,25,36,37,41,44,45,46,48,52,65 21:46.
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
8086 microprocessior PIN OUT DIAGRAM OF  Power supply and frequency signals  It uses 5V DC supply at V CC pin 40, and uses ground at V SS pin.
Presentation transcript:

A Design Example A Programmable Calculator

Programmable Calculator Working in Exact Mode Receiving Program from RS232 Port Saving Programs using RS232 Port Memory Fill/View/Edit/Search Switch to floating point calculator Using DMA for Large Data Transfer

Hardware Specifications Keyboard with 64 (8x8) Keys 8 Seven-Segment Display Timer Options: hh – mm – ss 8087 Coprocessor  Maximum Mode DMA 8237 for Fast Data Transfer UART 8250 for RS232 Port RAM ( FFFF) – EPROM (80000-FFFFF) Clock = *16*4= Hz =7.3728MHz

CPU Pins in Maximum Mode GND AD14 AD13 AD12 AD11 AD10 AD9 AD8 AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 NMI INTR CLK GND VCC AD15 A16/S3 A17/S4 A18/S5 A19/S6 RQ/GT0 RQ/GT1 QS0 READY RESET BHE/S7 MN/MX RD LOCK S2 S1 S0 QS1 TEST Max Mode GND

S2S1S0 Characteristics 000 Interrupt acknowledge 001 Read I/O port 010 Write I/O port 011 Halt 100 Code access 101 Read memory 110 Write memory 111 Passive State S0, S1 and S2 Signals

8086 System Maximum Mode

8284 Clock Generator for 8086 an 18-pin chip specially designed to be used with 8088/86 microprocessors, It provides the clock and synchronization for the microprocessor, also provides the READY signal for the insertion of wait states into the CPU bus cycle.

7.3728MHz MHz

Bank Write and Bank Read Control Logic Bank Write Control Logic Bank Read Control Logic A0 2 EPROMs Each 256KB = 256Kx8 = Eight or SRAMs Each 256KB = 256Kx8 = Eight or Total 1M

A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 D0 D1 D2 D3 D4 D5 D6 D7 CS OE WE A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 D0 D1 D2 D3 D4 D5 D6 D7 CS OE WE A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 D0 D1 D2 D3 D4 D5 D6 D7 CS OE WE A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 D0 D1 D2 D3 D4 D5 D6 D7 CS OE WE A0 A1 A2 A3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 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 D0 D1 D2 D3 D4 D5 D6 D7 CS OE D0 - D7 D8 - D15 A1-A16 Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 A0 A1 A2 G1 G2 A17 A18 A19 A0 DEN Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 A0 A1 A2 G1 G2 A17 A18 A19 BHE DEN RDL RDU RDL RDU RDL RDU EPROMs

Peripherals 8255 (Keyboard) 8255 (Display) Timer Interrupt Controller DMA 8237 Coprocessor 8087 UART 8250

Address Decoding for the Peripherals A PPI A0 A1 Latch (‘373) Display Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 X0 X1 X2 A0 A1 A2 A3 A4 A5 A6 A7 CS 8259 A0 CS AD0-AD7 D0-D7 Buffer ALE Keyboard Address: 000XXPP0 Timer Address: 010XXPP0 Display Address: 011XXPP0 UART Address: 101XPPP Address: 110XXXP0 DMA Address: 111PPPP0 IR0 IR1 DMA Keyboard Timer UART 8259

Address Definition Keyboard_BASEEQU0 Display_BASEEQU60H Timer_BASEEQU40H UART_BASEEQU0A0H DMA_BASEEQU0E0H 8259_BASEEQU0C0H

Connecting 8087 to Processor

8250/16450/16550 UART Connection A3 A2 A1 (System)  A2 A1 A0 (UART) Y5 (Decoder)  CS 101XPPP0 Line Drivers  RS232 io A0 A2 A4 A6 A8 AA AC AD A0 A2

Registers Transmitter holding register Receiver buffer register Interrupt enable register  A2

Registers Interrupt identification register 00000PPP  A4

Line Control  A6 Even Parity, 2 Stop bits, 8 Data bits

Modem Registers Modem Control Register Modem Status Register  A8 DTR Active status  AD

Line Status Status  AA

Divisor Register Input Clock : MHz  Required Baud Rate: 9600 bps  A6 DLAB Set  A0 0  A2 Baud RateDivisor(Decimal)Divisor(hex) 460, , , , C

Intel Hex Data Format : No – Address – Data – Check Sum :0A F C F C = 375

Commands From RS232 Upload Data Download Data Dump Memory Fill Memory Go To Address Breakpoint Trace Register …

Definitions DISPLAY_SEGMENTS EQUDisplay_BASE DISPLAY_GND EQUDisplay_BASE +2 DISPLAY_CTRL EQUDisplay_BASE+ 6 KEYBOARD_ROW EQUKeyboard_BASE KEYBOARD_COL EQUKeyboard_BASE+2 KEYBOARD_CTRL EQUKeyboard_BASE+6 TIMER_CH0 EQU Timer_BASE TIMER_CH1 EQUTimer_BASE+2 TIMER_CH2 EQUTimer_BASE+4 TIMER_CTRL EQUTimer_BASE+6 IC8259_0 EQU8259_BASE IC8259_1 EQU8259_BASE+2

Main Program ORG 0FFF0H ;Address FFFF0 XOR AX,AX ;AX=0 MOV DS,AX ;DS=0 MOV AH,70H ;AX=7000H MOV SS,AX ;STACK From 7FFFFH MOV SP,0FFFFH; SS*10H+SP=7FFFFH JMP 0F000H:100

Initialize & Main LOOP ORG 100H ;Address F0100 CLI CALL INIT_KEYBOARDINIT_KEYBOARD CALL INIT_DISPLAYINIT_DISPLAY CALL INIT_TIMERINIT_TIMER CALL INIT_8259INIT_8259 CALLINIT_DMA CALLINIT_RS232 STI Main_LOOP: CALLKeyboard_hit JZRS232 CALLGETCH ;Scan Code Available in AL CALL Process_Key RS232: CALLRX_AVAILABLE JZMain_LOOP CALL Process_RX JMP Main_LOOP

INIT_KEYBOARD INIT_KEYBOARD: MOV AL, B ;Mode0 output for A & ;Mode 0 input for B input for C OUTKEYBOARD_CTRL,AL MOV AL,0FFH ;OFF All Rows OUT KEYBOARD_ROW,AL XOR AL,AL ;Reset FIFO MOV [Key_head],AL MOV [Key_tail],AL RET

INIT_DISPLAY INIT_DISPLAY: MOV AL, B ;Mode 0 and out for both A & B. C input OUT DISPLAY_CTRL,AL MOV AL,0FFH OUT DISPLAY_GND,AL ;All 7-Segments off XOR AX,AX ;Clear ALL Ms of Calc(X,Y,M0-M7) MOV ES,AX MOV DI,offset X_SIZE CLD MOV CX,10 REP:STOSW ;X_SIZE=Y_SIZE=M_SIZE0-7=0 CALL REFRESH_DISPLAYREFRESH_DISPLAY RET

REFRESH_DISPLAY REFRESH_DISPLAY: ; Shows the content of X register MOV DI,offset DISPLAY_DATA MOV AX,[X_SIZE] CMP AX,0 JNE X_NOT_ZERO XOR AX,AX MOV WORD PTR [DI],AX MOV WORD PTR [DI+2],AX MOV WORD PTR [DI+4],AX MOV BYTE PTR [DI+6],AL MOV BYTE PTR [DI+7], B RET

INIT_TIMER INIT_TIMER: MOV AL, B ;Counter 0, 2 Bytes, Mode 3, Binary OUT TIMER_CTRL,AL MOV AX,36864 ;7.3728M/36864=200Hz; Refreshing Rate OUT TIMER_CH0,AL MOV AL,AH OUT TIMER_CH0,AL MOV AL, B ;Counter 1, 2 Bytes, Mode 3, BCD OUT TIMER_CTRL,AL MOV AX,200H ;200Hz/200=1Hz; Time Refresh Rate OUT TIMER_CH1,AL MOV AL,AH OUT TIMER_CH1,AL RET

INIT_8259 INIT_8259: MOV AL, B ;ICW1: Edge - Single - ICW4 OUT IC8259_0,AL MOV AL,80H ; ICW2=Interupt Type OUT IC8259_1,AL MOV AL, B ;ICW4: 8086 Processor RET

INIT_RS232 INIT_RS232: