RS232 uses inverse logic; that is, a positive bit at the HCS12 UART is inverted by the onboard RS232 driver chip and appears as a negative signal on the serial cable. The Serial ports are implemented by the dual on-chip hardware UARTs (Universal Asynchronous Receiver/Transmitters) on the Freescale 9S12 (HCS12) microcontroller. RS232 is by far the most common serial protocol, and is the default protocol for both of the PDQ Board’s serial ports. In the most common multi-drop RS-485 protocol, one computer is designated as a "master" and the rest of the computers or devices on the serial bus are designated as "slaves". Each serial port can be configured for the RS232 or RS485 protocol, and runs at standard baud rates up to 115,200 bits per second. The Serial 1 and Serial2 ports can be configured for either RS-232 or RS-485 communications at standard baud rates up to 115200 bits per second. The primary and secondary serial communications ports are accessible through the PDQ Board's 10 pin, dual row Communications Header (H2) and through the Docking Panel's 10 pin, right-angle, dual row Communications Header (H1) and individual DB-9 Serial 1 and Serial 2 connectors.
The mating 10-pin connectors that join the H6 header of the PDQ Board to the H4 header of the Docking Panel are typically not accessed directly, and are not discussed in detail here. The pinout of the PDQ Board’s Communications Header (H2), Docking Panel’s Communications Header (H1), rs485 cable and the Docking Panel’s Communications DB-9 Connectors are shown in the following tables. The Serial1 and Serial2 ports have identical communications capabilities, although more of the Serial1 signals (both RS232 and RS485) are made available on the Docking Panels headers and connectors. Of the processor’s three synchronous SPI (Serial Peripheral Interface) ports, two are available for inter-processor communications on multi-processor systems, and the third is brought out to the Wildcard expansion bus. It provides a convenient means of connecting the QScreen Controller to a variety of peripheral devices, including analog to digital and digital to analog converters, real time clocks, and other computers which use high speed communication. RS232’s greatest benefit is its universality; most personal computers can use this protocol to send and receive serial data. The secondary channel is very useful for debugging application programs that communicate with other computers or I/O via the primary channel.
While a multi-drop "type" application has many desirable advantages, RS422 devices cannot be used to construct a truly multi-point network. RS422 devices. These networks are often used in a half-duplex mode, where a single master in a system sends a command to one of several "slave" devices on a network. A single master can broadcast commands to all the slaves, and can direct commands to an individual slave using its unique address. Even though the MOSI pin is not connected to anything, the master initiates a transmission using a "dummy" byte. If you are running Serial2 at 4800 baud, the rest of your application must be able to function properly using the remaining portion of the CPU time. Since both channels can operate simultaneously and independently, serial debugging can be performed while the application program is communicating via its primary channel. They translate the bit-by-bit data on the serial cable into bytes of data that can be interpreted by the operating system or by your application program.
If your application requires communicating with a device that expects to receive a parity bit, the generation of a parity bit and selection of even or odd parity, and whether there are seven or eight data bits in each byte, is performed by setting or clearing bits in the configuration registers SCI0CR1 for Serial1 and SCI1CR1 for Serial2. Although the RS232 protocol specifies functions for as many as 25 pins, each communications channel requires only three for simple serial interfaces: /TxD1 (transmit data), /RxD1 (receive data), and DGND (digital ground). The RS232 protocol specifies the use of two separate grounds, a signal ground and a protective (or chassis) ground. RS485 meets the requirements for a truly multi-point communications network, and the standard specifies up to 32 drivers and 32 receivers on a single (2-wire) bus. Each UART (sometimes referred to as a "USART") controls the serial-to-parallel and parallel-to-serial conversion and performs all of the timing functions necessary for one asynchronous serial communications link. To solve the "data collision" problem often present in multi-drop networks hardware units (converters, repeaters, micro-processor controls) can be constructed to remain in a receive mode until they are ready to transmit data.
댓글 달기 WYSIWYG 사용