Serial Interfacing

1y ago
7 Views
2 Downloads
518.19 KB
25 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Kairi Hasson
Transcription

Chapter 13Serial InterfacingExpected OutcomesExplain the fundamental idea of operation of serial interfaceList and describe type of serial interfaceIdentify the serial interface characteristic such as data framing andbaud rateExplain and describe the role line driver in serial interfaceWrite a program using serial interfaceNMKNYFKEEUMP

IntroductionComputers transfer data in two waysParallelSerialParallel data transfers often 8 or more lines are used to transferdata to a device that is only a few feet away such as printers andhard disksParallel requires a short amount of time to transfer dataHowever, the distance of the devices are limited and impracticalto be used in a long distanceThe parallel is complex to be designed and prone to errorIn serial method, the data is sent one bit at a timeNMKNYFKEEUMP

Parallel vs SerialComputers transfer data in two waysParallelSerialTransmitterReceiverSerial CommunicationTransmitterParallel CommunicationNMKNYFKEEUMPReceiver

Serial CommunicationSerial data communication uses two methodsAsynchronousSynchronousThe synchronous transfers a block of data (characters) at a time,thus requiring the transmitter and receiver to have the same clocksystemThe asynchronous transfers a single byte at a timeFor a small system, normally asynchronous method is preferred asthe design is simple and cheapSpecialized chips are designed for both method: UART (UniversalAsynchronous Receiver and Transmitter) and USARTM68000 family peripheral – MC68681 DUARTM6800 family peripheral - MC6850 ACIANMKNYFKEEUMP

UARTSome of the possible connectionsRxClkTxClkRxD PTxDUARTTxDRxDTxClkRxClkRxClkTxClk PUART PUARTmodemmodemUARTPSTNTxClkRxClkNMKNYFKEEUMP P

DUART 68681The MC68681 (dual universal asynchronous receiver/transmitter)is part of M68000 peripheral using asynchronous bus structureFeatures2 independent full-duplex asynchronous channelsMaximum data transfer rate up to 1 MB/sProgrammable data formatProgrammable channel modeIndependent programmable baud rateVersatile interrupt systemMulti-function 16-bit programmable counter/timerMulti-function 8-bit output port and etc NMKNYFKEEUMP

ACIA 6850Alternatively, M6800 family peripheral such as ACIA 6850 can beused in serial transmissionAsynchronous Communication Interface Adapter (ACIA 6850)is widely used due to cost and simplicityFeaturesData lines (D0-D7)Chip selects (CS0,CS1 and CS2*)Enable (E)Read and Write (R/W*)Register Select (RS)Received Data (RxD) and Transmit Data (TxD)Transmit Clock (TxClk) and Receive Clock (RxClk)Modem Control Line (CTS*, RTS*, DCD*)NMKNYFKEEUMP

Data FramingBefore transmission each character must be framedData framing for asynchronous method1 start bitAlways “0” to indicate the beginning of character5-8 bits dataIt begins with LSB1 parity bit (optional)Can be odd or even parity depending on the programmer1 or more stop bitsAlways “1” to indicate the end of characterStartBitParityBit5 - 8 bits dataNMKNYFKEEUMPStopBits

ACIA 6850Internal architecture of ACIA 6850IRQStatus Register (SR)Receive Data Register(RDR)D7-D0RSReceived eceived DataTxDTransmit DataTransmit Shift RegisterTransmit DataRegister (TDR)Control Register (CR)TxClkRxClkNMKNYFKEEUMPFromClockGenerator

ACIA 6850Baud rate generator circuit : Baud rate generator chips such asMC14411or oscillator RxClkBaud RateGenerator

RegistersThere are 4 registersControl Register (CR)Status Register (SR)Transmit Data Register (TDR)Receive Data Register (RDR)RSR/WName Register00CRControl Register01SRStatus register10TDRTransmit Data Register11RDRReceive Data RegisterNMKNYFKEEUMP

RegistersThe address register depends onAddress decoderUDS*/LDS*NA1LDS*RSCS1N 2UDS*RSCS1N 1TDR/RDRN 3N 4N 5N 6N 7NA1CR/SRN 2CR/SRN 1TDR/RDRN 3N 4N 5N 6N 7NMKNYFKEEUMP

Control RegisterThe control register (CR) controls the function of the receiver,transmitter, interrupt enables, and the Request-to-Sendperipheral/modem control outputCR7Receive InterruptEnable BitTransmitter ControlBitsCR6CR5CR4CR3CR2CR1Data Format(Data size, stop bits, parity)000 - 7 bit data, 2 stop bits, even001 - 7 bit data, 2 stop bits, odd010 - 7 bit data, 1 stop bits, even011 - 7 bit data, 1 stop bits, odd100 - 8 bit data, 2 stop bits, none101 - 8 bit data, 1 stop bits, none110 - 8 bit data, 1 stop bits, even111 - 8 bit data, 1 stop bits, oddNMKNYFKEEUMPCR0Counter Divide Select Bits00 - Divide 101 - Divide 1610 - Divide 6411 - Master RESET

Status RegisterInformation on the status of ACIA is available by readingthe Status Register DRFInterrupt RequestParity ErrorOverrun ErrorFraming ErrorReceive Data register FullTransmit Data Register EmptyData Carrier DetectClear to SendNMKNYFKEEUMP

Programming ACIA 6850ACIA must be initialize in order to operate properlyFour parameter must be set between transmitter andreceiverData rateNumber of bitsType of parityNumber of stop bitsNMKNYFKEEUMP

Programming ACIA 6850Example: Write a routine to initialize ACIA with thefollowing characteristic; 8 bits, 1 stop bit, no parity. Assumeclock frequency is 153.6 kHzINIT MOVE.BMOVE.BMOVE.WLOOP SUBQ.WBNERTS#3,ACIACR# 15,ACIACR# 400,D0#1,D0LOOPNMKNYFKEEUMP;RESET;Set CR;Delay

Programming ACIA 6850In order to transmit or receivedata, TDRE and RDRF must bemonitoredIf TDR is empty, TDRE is set,allowing new data to betransmittedSimilarly, if RDR is full, RD is setand a new data must be readNMKNYFKEEUMPTDRE 1?YesWrite a byte to TDRRDRF 1?YesRead a byte fromRDR

Programming ACIA 6850Example: Write a routine to send a character „A‟continuouslySCAN BTST.B #1,ACIASRBEQ SCANMOVE.B #’A’,ACIADRBRA SCANRTS;TDRE 1?;No, scan again;Load ‘A’ into DR;Repeat sendingNMKNYFKEEUMP

Programming ACIA 6850Example: Read a byte from Data Receive register andstore in D0SCAN BTST.B #0,ACIASRBEQ SCANMOVE.B ACIADR,D0RTS; Read Status Register; RDRF 0,scan again; Store a byte in D0NMKNYFKEEUMP

Line DriverThe 6850 provides two pins (TxD and RxD) to be usedspecifically to transfer and receive data seriallySince the pins are TTL compatible, they require line driver to allowdata to be transmitted at a longer distanceThe most common line drivers are RS-232, RS422 and RS423However, RS-232 (EIA 232) is widely used as it s the simplest andthe cheapest line driverSome examples of the ICs that provide the EIA-232 line driver areMAX 233, MAX 232 , MC145407 or a pair of MC1488/MC1489NMKNYFKEEUMP

EIA-232Widely used for serial interface standardLogic “1” is represented by -30 to -25 V and logic “0” is 3 to 25 Vallowing the communication to be up to 10 meterThere are two type of RS232 connectors; DB-25 and DB-9Pin12345DescriptionData Carrier Detect (DCD)Received Data (RxD)Transmitted Data (TxD)Data Terminal Ready (DTR)Signal Ground (GND)NMKNYFKEEUMPPin6789DescriptionData Set Ready (DSR*)Request To Send (RTS*)Clear To Send (CTS*)Ring Indicator (RI)

EIA-232MAX232 internal architecture 5V1 F116261 F341 F6850MAX2321111RxD 1012TxD1 F1112109TTL side5T1inR1outT2inR2inDB-914 213T1outR1inT2outR2in141378RS232 sideNMKNYFKEEUMP35

Baud RateTo ensure a proper communication, thebaud rate of the system must match thebaud rate of the PC‟s COM portThe baud rate for the system depends onbaud rate generator (TxClk and RxClk)NMKNYFKEEUMPStandardbaud rate11015030060012002400480096001920028800

Self-TestExerciseExplain the advantage of using serial transmission compare toparallel transmissionExerciseDescribe the important of using line driver such as EIA232 orRS422ExerciseWhat is the difference between MAX232 and MAX233?ExerciseState and elaborate the pin requirement for asynchronoustransmissionNMKNYFKEEUMP

Self-TestExerciseBriefly explain the procedure for sending a byte of data using ACIA6850ExerciseState and explain bits (TDRE and RDRF) in status registerExerciseWhat is the difference between synchronous and asynchronoustransmissionExerciseA 1024 x 512 x 16-grey-level image is to be transmitted to aprinter using serial communication at the rate of 19.6 kbps. Thedata format is one start bit, 8 data bit and one stop bit. How longdoes it takes to transmit the image?NMKNYFKEEUMP

The asynchronous transfers a single byte at a time For a small system, normally asynchronous method is preferred as the design is simple and cheap Specialized chips are designed for both method: UART (Universal Asynchronous Receiver and Transmitter) and USART M68000 family peripheral -MC68681 DUART M6800 family peripheral - MC6850 ACIA .

Related Documents:

1 TXD O (1) Serial port (Transmitted Data) 2 DTR_N O (1) Serial port (Data Terminal Ready) 3 RTS_N O (1) Serial port (Request To Send) 4 VDD_325 P RS232 VDD. The power pins for the serial port signals. When the serial port is 3.3V, this should be 3.3V. When the serial port is 2.5V, this should be 2.5V. 5 RXD I (2) Serial port (Received Data)

4.6 More Projects on LED Interfacing to Microcontrollers 51 4.6.1 Running LEDs 51 4.6.2 Running Bicolor LED 51 4.6.3 Interfacing 6 LEDs Using 3 Microcontroller Pins by 51 4.6.4 The LED Dimmer Demoboard 51 4.6.5 Fading RGB LED 52 4.6.6 LED Moving Font 52 4.7 DIP Switch Interfacing: Getting Input to Your Embedded System 52 4.8 LCD Interfacing 54

3 RTS_N O (1) Serial port (Request To Send) 4 VDD_325 P RS232 VDD. The power pins for the serial port signals. When the serial port is 3.3V, this should be 3.3V. When the serial port is 2.5V, this should be 2.5V. 5 RXD I (2) Serial port (Received Data) 6 RI_N I/O (3) Serial port (Ring Indicator) 7 GND P Ground 8 NC No Connect

HP 500B MT - Serial number-MXL 1240IKS HP Z200 - Serial number-2UA1091G78 HP Prodesk 400G1 SFF - Serial number-MSL5131SMl Rio Magicard Pro - Serial number-61 F7849 HP Compaq DC5700 Microtower - Serial number-2UA7120SFR HP Workstation XW6200 - Serial number-2UA6020G4B REGULAR MEETING. April 5. 2021 Dated this 5th day of April, 2021 ATTEST:

ECHO: PB-770T (Serial. INTRODUCTION (Serial number : 11000001-11999999) (Serial number : 12000001-12999999) (Serial number : 13000001-13999999) number : 11000001-11999999) (Serial number : 12000001-12999999) (Serial number : 13000001-13999999) CONTENTS. We are constantly working on techni

182238-04 Serial cable, RS232 null modem, DB-9 female to DB-9 female, 4 m 183045-01 Serial cable, RS232 straight through, DB-9 female to DB-9 female, 1 m 183045-02 Serial cable, RS232 straight through, DB-9 female to DB-9 female, 2 m 183045-04 Serial cable, RS232 straight through, DB-9 female to DB-9 female, 4 m 183283-01 Serial cable, RS485 .

FOREWORD 7. Applicable Serial No. Frame Serial No. Engine Serial No. 8. Applicable Colour Code (The (*) mark shows Model colour.) 9. Applicable Starting Serial No. Frame Serial No. Engine Serial No. Abbreviation Colour Name Colour Code CM CHROME PLATED 0093 DPBMC(*) DEEP PURPLISH BLUE METALLIC C 0564 SL SILVER 0035 YB(*) YAMAHA BLACK 0033

This manual describes the installation and operation of the SYSMAC CS/CJ-series CS1W-SCB@1-V1 Serial Communications Boards and CS1W-SCU@1-V1, CJ1W-SCU@1-V1, and CJ1W-SCU@2 Serial Communications Units. It includes the sections described on the next page. The Serial Communications Boards are classified as Inner Boards and the Serial Communications