+ All Categories
Home > Documents > E3165 DIGITAL ELECTRONIC SYSTEM

E3165 DIGITAL ELECTRONIC SYSTEM

Date post: 24-Feb-2016
Category:
Upload: vince
View: 39 times
Download: 0 times
Share this document with a friend
Description:
E3165 DIGITAL ELECTRONIC SYSTEM. INTRODUCTION. Microprocessor must communicate (read and write) with RAM, ROM or I/O devices. To ensure the microprocessor can communicate smoothly, we need interfacing. Operation of input/output: Unconditional I/O Transfer – MPU Initiated Interrupt System - PowerPoint PPT Presentation
Popular Tags:
33
Transcript

E4161

E3165 DIGITAL ELECTRONIC SYSTEM1INTRODUCTIONMicroprocessor must communicate (read and write) with RAM, ROM or I/O devices.To ensure the microprocessor can communicate smoothly, we need interfacing.Operation of input/output:Unconditional I/O Transfer MPU InitiatedInterrupt SystemDirect Memory AccessHand-shaking2UNCONDITIONAL I/O TRANSFERUnconditional transfer - Used only in situation where an output device is always ready to accept data from the MPU or an input device always has data ready for the MPU. Therefore no need for any exchange of control signals.Conditional transfer MPU will send / receive data when the output device ready. Need some control signals.

3INTERRUPT SYSTEMInterrupt is a signal that causes the microprocessor to end its normal execution to initiate interrupt operation.2 types:Hardware occur when microprocessor interrupt pin given truth logic. (Figure 2.6, Unit 2/18)Software using instruction programming.4HOW INTERRUPT INITIATEDMicroprocessor receive interrupt request signal. Existing process will proceed until end before entertain the interrupt request.PC and register value will be stored (push) into stack.PC will be load with address of interrupt sequence (interrupt service routine/ISR).After executing the interrupt sequence(ISR), data in stack will be loaded back (pull) from stack to PC and register respectively.Microprocessor will continue the original program.5HOW INTERRUPT INITIATE

6INTERRUPT SYSTEMTypes of interrupt:Maskable InterruptInterrupt signals that can be received or not by microprocessor, depends on priority.Nonmaskable InterruptInterrupt signal that must be received by the microprocessor.The interrupt advantageTo ensure the I/O devices or peripheral devices interrupting microprocessor to initiate.Reduce time and cost in such a way that interrupt only occurs when microprocessor receive an interrupt signal.7DIRECT MEMORY ACCESS (DMA)DMA helps microprocessor in data transfer between memory and I/O. So microprocessor can do other work.Example: 8085A with pin HOLD and HLDA. 8257 DMA controller as in Figure 6.2DMA give high input to the 8085A through pin HOLD.8085A will complete the execution of current process.8085A will puts the buses to Hi-Z and send high input to DMA through pin HLDA.DMA take over the buses and transfer data from memory to I/O or vice versa.When the transfer has been completed, DMA returns control of the buses to 8085A by send low input through pin HOLD.8

9HAND-SHAKINGUsed for transfer data between microprocessor and slower I/O.Transfer data fr0m I/O to microprocessor:I/O send signal indicated ready to send data to microprocessor.Microprocessor send signal indicated ready to receive data from I/O.Transfer data.After receive data, microprocessor send signal indicate the transfer is complete.10HAND-SHAKINGTransfer data fr0m microprocessor to I/O:Microprocessor send signal indicated ready to send data to I/O.I/O send signal indicated ready to receive data from microprocessor.Transfer data.After receive data, I/O send signal indicate the transfer is complete.11SERIES DATA TRANSFERData transfer in one line, bit by bit.Transferring data is slow.Usually for long distance.

12PARALLEL DATA TRANSFEREvery data have its own line and transferred simultaneously either in form byte, word or longword.Faster data transfer.Usually used in circumstance that speed is count.Disadvantages:High costGainer noise during data transfer.

13PARALLEL INTERFACEExample : PIA (Peripheral Interface Adapter)Used to interfacing peripheral devices with CPU in parallel through data bus.

14PARALLEL INTERFACEConsist of two part:CPU side connecting PIA to CPU through data bus, address bus and control bus.Peripheral side connecting PIA to I/O through port A and port B which can be programmed to input or output.15SERIAL INTERFACEExample : ACIA (Asynchronous Communication Interface Adapter)ACIA used to interface between serial (I/O) to parallel (CPU)

16SERIAL INTERFACEData from I/O to ACIA is in series. This data will be store in data register before synchronously sent in parallel as shown below:

17ASYNCHRONOUS SERIAL DATA COMMUNICATIONMost of series data communication performed by microcomputers uses asynchronous communication.

Takes 8 bit parallel data from MPU data bus and converts to serial data to be sent to the serial device.Takes a serial data from serial device and converts to 8 bit parallel data to the MPU via data bus.

18ASYNCHRONOUS SERIAL DATA COMMUNICATION

19ASYNCHRONOUS SERIAL DATA COMMUNICATIONA START bit = logic 0.5 to 8 bit data. LSBtransmitted first.Parity bit for error-detection either odd or even parity.1, 1 or 2 STOP bit =logic 1.

20BAUD RATEBaud is use to identify the rate at which the data signal is changing.

Baud is a measure of how frequently the serial signal is changing.A higher baud rate means the signal is changing more rapidly and require higher channel bandwidth.Sometimes, baud rate is equivalent to data rate.

21SYNCHRONOUS SERIAL DATA COMMUNICATIONMore efficient, more costly.No START or STOP bits. Data is transmitted continuously.Using sync character, receiver and transmitter is synchronized.If no data, these sync character continuously transmitted.Example of sync character, SYN = 00010110.When receiver see SYN, its synchronize the internal clock with the transmitter.When transmitter stop sending SYN and start sending data, receiver automatically converts every 8 bits serial data to parallel data to be read by computer.22BISYNCWhen idle = SYNReady to send data = STX / 00000010Sending data = 128 or 256 characterEnd of text = EXT / 00000011Error checking = BCC, if error send data again.To send next block of data, send 2 SYN first.

23

24PIA6821 (For MC68000)Two completely independent 8 bit I/O port. (Port A and Port B)Each port has data direction register for specify either the port an input or output. (DDRA and DDRB)If Port A is input, DDRA must has logic 0.If Port B is output, DDRB must has logic 1.25PIA6821Control register (CRA and CRB) allow us to choose certain interrupt and peripheral control capabilities.Provides status information on interrupt.CA1, CA2, CB1, CB2 as status inputs for conditional I/O transfer or interrupt.Specialty of CA2 and CB2 is can act as control outputs in handshaking. It is done by using software.Output register (ORA and ORB) hold data to be sent to output devices.26PIA6821MPU communicate with PPI/PIA using those 6 register which is:DDRADDRBCRACRBORAORB

27PPI8255A (For Intel)

28PPI8255AData Bus Buffer8 bit bi-directional.Transfer not only data bus control words and status information.Read/Write and ControlManage / control transfer of data, control and status between CPU and PPI.CSRD if low, send data to CPUWR IF low, send data to PPIA0 and A1 selection of three port and control word register. (A0 select port A, port B or port C)RESET if high clears the control register and all port are input.29PPI8255AGroup A and Group B ControlsContain control word for setting mode, bit set, bit reset and etc for each port.Group A control port A and Port C upper (C7 C4)Group B control port B and Port C lower (C3 C0)A1A0RDWRCSINPUT OPERATION (READ)00010PORT A - DATA BUS01010PORT B - DATA BUS10010PORT C - DATA BUSOUTPUT OPERATION (WRITE)00100DATA BUS - PORT A01100DATA BUS - PORT B10100DATA BUS - PORT C11100DATA BUS - CONTROLDISABLE FUNCTIONXXXX1DATA BUS - 3 STATE11010ILLEGAL CONDITIONXX110DATA BUS - 3 STATE30ADC/DACTransducer device that converts the physical variable to an electrical variable.ADC convert analog input from transducer to digital.Computer store the digital value and process it according to program.DAC convert the digital output from computer to analog.Actuator device that control the physical variable.

31INPUT/OUTPUT AND MOTOR CONTROL CIRCUIT

Analog output = K x digital input32INPUT/OUTPUT AND MOTOR CONTROL CIRCUIT

Resolution (step size) = 1V33


Recommended