Interfacing The Serial / RS- 2. Port. Interfacing the Serial / RS2. Port. The Serial Port is harder to interface than the Parallel Port. In most cases. any device you connect to the serial port will need the serial transmission. This can be done using a. UART. On the software side of things, there are many more registers that you. Standard Parallel Port. The serial port transmits a '1' as - 3 to - 2. Therefore the serial port can have a maximum swing of 5. V compared to the parallel port which has a maximum swing of 5 Volts.
TSO Tutorial. TSO is an acronym for Time Sharing Option, which is an accurate summation of the primary service that the TSO feature provides. Time sharing allows the. Whereas Chapter 1, First steps gave you a quick introduction to VirtualBox and how to get your first virtual machine running, the following chapter describes in. Therefore cable loss is not going to be as much of a problem for serial cables than they are for parallel. If your device needs to be mounted a far distance away from the computer then 3 core cable (Null Modem Configuration) is going to be a lot cheaper that running 1. However you must take into account the cost of the interfacing at each end. You may of seen many electronic diaries and palmtop computers which have infra red capabilities build in. However could you imagine transmitting 8 bits of data at the one time across the room and being able to (from the devices point of view) decipher which bits are which? Therefore serial transmission is used where one bit is sent at a time. Ir. DA- 1 (The first infra red specifications) was capable of 1. UART. The pulse length however was cut down to 3/1. RS2. 32 bit length to conserve power considering these devices are mainly used on diaries, laptops and palmtops. Many of. these have in built SCI (Serial Communications Interfaces) which can be. Serial Communication reduces the pin. MPU's. Only two pins are commonly used, Transmit Data (TXD). Receive Data (RXD) compared with at least 8 pins if you use a 8 bit. Parallel method (You may also require a Strobe). It only requires 3 wires. TD, RD & SG) to be wired straight through thus is more cost effective to. The theory of operation is reasonably easy. The. aim is to make to computer think it is talking to a modem rather than. Any data transmitted from the first computer must be. TD is connected to RD. The second computer. RD is connected to TD. Signal Ground (SG). When the Data Terminal Ready is asserted active, then the. Data Set Ready and Carrier Detect immediately become active. At this point. the computer thinks the Virtual Modem to which it is connected is ready and. As. both computers communicate together at the same speed, flow control is not. When. the computer wishes to send data, it asserts the Request to Send high and. Clear to Send, It immediately gets a reply. As we don't have a modem connected to the phone line this. Figure 2 : Loopback Plug Wiring Diagram. This loopback plug can come in extremely handy when writing Serial / RS2. Communications Programs. It has the receive and transmit lines connected. Serial Port is. immediately received by the same port. If you connect this to a Serial Port. Terminal Program, anything you type will be immediately displayed. This can be used with the examples later in this tutorial. Please note that this is not intended for use with Diagnostic Programs and. For these programs you require a differently. Loop Back plug which may vary from program to program. A typical Data Terminal. Device is a computer and a typical Data Communications Device is a Modem. DTE to DCE is. the speed between your modem and computer, sometimes referred to as your. This should run at faster speeds than the DCE to DCE speed. Therefore we should. DCE to DCE speed to be either 2. K or 3. 3. 6. K. Considering the. DTE to DCE speed to be. BPS.(Maximum Speed of the 1. UART) This is where some. The communications program. DCE to DTE speeds. However they see 9. KBPS, 1. 4. 4 KBPS etc and think it is your modem speed. This is very. much like PK- ZIP but the software in your modem compresses and decompresses. When set up correctly you can expect compression ratios of 1: 4 or. If we were. transferring that text file at 2. K (DCE- DCE), then when the modem. KBPS between computers and. DCE- DTE speed of 1. KBPS. Thus this is why the DCE- DTE should. Lets say. for example its on a new 3. KBPS modem then we may get a maximum 2. BPS transfer between modem and UART. If you only have a 1. BPS tops, then you would be missing out on a extra bit of. Buying a 1. 6C6. 50 should fix your problem with a maximum transfer. BPS. These are. MAXIMUM compression ratios. In some instances if you try to send a already. If this. occurs try turning. This should be fixed on newer modems. Some files. compress easier than others thus any file which compresses easier is. Sooner or later data is. Flow control has two basic. Hardware or Software. Xon is normally indicated by the ASCII 1. ASCII 1. 9 character is used for Xoff. The modem will only have a small. Xoff character to. Once the modem has room for more. Xon character and the computer sends more data. This. type of flow control has the advantage that it doesn't require any more. TD/RD lines. However on slow links. It uses two. wires in your serial cable rather than extra characters transmitted in your. Thus hardware flow control will not slow down transmission times. Xon- Xoff does. When the computer wishes to send data it takes active. Request to Send line. If the modem has room for this data, then the. Clear to Send line and the computer. If the modem does not have the room then it will not. Clear to Send. Its the little. Most cards will have the UART's. The 8. 25. 0 series, which includes the 1. UARTS are the most commonly found type in your PC. Later we will look at. The only two differences. On the 8. 25. 0 Pin 2. Pin 2. 9 was not. UARTs. These are Transmit Ready. Receive Ready which can be implemented with DMA (Direct Memory Access). Mode 0 supports single. DMA where as Mode 1 supports Multi- transfer DMA. This mode is selected when the FIFO. Bit 0 of the FIFO Control Register or When the. FIFO buffers are enabled but DMA Mode Select = 0. RXRDY will go inactive high when no more characters are. Receiver Buffer. TXRDY will be active low when there are no. Transmit Buffer. It will go inactive high after the. Transmit Buffer. In. Mode 1, RXRDY will go active low when the trigger level is reached or when. Time Out occurs and will return to inactive state when no more. FIFO. TXRDY will be active when no characters. Transmit Buffer and will go inactive when the FIFO. Transmit Buffer is completely Full. That includes TD, RD, RI, DCD, DSR. CTS, DTR and RTS which all interface into your serial plug, typically a. D- type connector. Therefore RS2. 32 Level Converters (which we talk about in. These are commonly the DS1. Receiver and the DS1. PC has +1. 2 and - 1. The. RS2. 32 Converters will convert the TTL signal into RS2. Logic Levels. The frequency of this input should equal the receivers baud rate * 1. Pin 1. 0RDReceive Data. Pin 1. 1TDTransmit Data. Pin 1. 2CS0. Chip Select 0 - Active High. Pin 1. 3CS1. Chip Select 1 - Active High. Pin 1. 4n. CS2. Chip Select 2 - Active Low. Pin 1. 5n. BAUDOUTBaud Output - Output from Programmable Baud Rate Generator. Frequency = (Baud Rate x 1. Pin 1. 6XINExternal Crystal Input - Used for Baud Rate Generator Oscillator. Pin 1. 7XOUTExternal Crystal Output. Pin 1. 8n. WRWrite Line - Inverted. Pin 1. 9WRWrite Line - Not Inverted. Pin 2. 0VSSConnected to Common Ground. Pin 2. 1RDRead Line - Inverted. Pin 2. 2n. RDRead Line - Not Inverted. Pin 2. 3DDISDriver Disable. This pin goes low when CPU is reading from UART. Can be connected to Bus Transceiver in case of high capacity data bus. Pin 2. 4n. TXRDYTransmit Ready. Pin 2. 5n. ADSAddress Strobe. Used if signals are not stable during read or write cycle. Pin 2. 6A2. Address Bit 2. Pin 2. 7A1. Address Bit 1. Pin 2. 8A0. Address Bit 0. Pin 2. 9n. RXRDYReceive Ready. Pin 3. 0INTRInterrupt Output. Pin 3. 1n. OUT2. User Output 2. Pin 3. 2n. RTSRequest to Send. Pin 3. 3n. DTRData Terminal Ready. Pin 3. 4n. OUT1. User Output 1. Pin 3. 5MRMaster Reset. Pin 3. 6n. CTSClear To Send. Pin 3. 7n. DSRData Set Ready. Pin 3. 8n. DCDData Carrier Detect. Pin 3. 9n. RIRing Indicator. Pin 4. 0VDD+ 5 Volts. Table 2 : Pin Assignments for 1. A UART. The UART requires a Clock to run. If you look at your serial card a. MHZ or a 1. 8. 4. MHZ Crystal. This clock. Programmable Baud Rate Generator which directly. For this an external connection mast be made from. Baud. Out) to pin 9 (Receiver clock in.) Note that the clock signal. Baudrate * 1. 6. Data. PDF format so you will need Adobe Acrobat Reader to. Texas Instruments has released. UART which has 6. Byte FIFO's. Data Sheets for the TL1. C7. 50 are. available from the Texas Instruments Site. It contains no scratch register. The 8. 25. 0A was an improved version of the 8. AThis UART is faster than the 8. Looks exactly the same to software than 1. BVery similar to that of the 8. UART. 1. 64. 50. Used in AT's (Improved bus speed over 8. Operates comfortably at 3. KBPS. Still quite common today. This was the first generation of buffered UART. It has a 1. 6 byte buffer, however it doesn't work and is replaced with the 1. A. 1. 65. 50. AIs the most common UART use for high speed communications eg 1. K & 2. 8. 8. K Modems. They made sure the FIFO buffers worked on this UART. Very recent breed of UART. Contains a 3. 2 byte FIFO, Programmable X- On / X- Off characters and supports power management. Produced by Texas Instruments. Contains a 6. 4 byte FIFO. Part Two : Serial Port's Registers (PC's)Name Address. IRQCOM 1 3. F8 4. COM 2 2. F8 3. COM 3 3. E8 4. COM 4 2. E8 3. Table 3 : Standard Port Addresses. Above is the standard port addresses. These should work for most P. C's. If. you just happen to be lucky enough to own a IBM P/S2 which has a. IRQ's. Each address will take up 2 bytes. The. following sample program in C, shows how you can read these locations to obtain. This is how the. UART is able to have 1. DLAB stands for Divisor Latch Access Bit. When DLAB. is set to '1' via the line control register, two registers become available. UART incorporates a divide by 1. Assuming we had the 1. MHZ clock signal, that would. UART capable of. transmitting and receiving at 1. Bits Per Second (BPS).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2017
Categories |