If a Star Configuration is Unavoidable
페이지 정보
본문
The Serial ports are implemented by the dual on-chip hardware UARTs (Universal Asynchronous Receiver/Transmitters) on the Freescale 9S12 (HCS12) microcontroller. Most computers conform to IBM PC AT-compatible RS232 interfaces which use 9-pin D-Type connectors, consequently the PDQ Board brings out its serial ports to two female 9-pin D-Type connectors on the Docking Panel. 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, rs485 cable and are not discussed in detail here. These 9-pin standard DB-9 serial connectors are located on the back of the Docking Panel. 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. Two asynchronous communications ports named Serial1 and Serial2 can each be configured for RS232 or RS485 protocols. 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. This chapter describes those drivers, and presents code that makes it easy to configure the SPI for different data transfer rates and formats. A 2-wire synchronous IIC (Inter-IC) bus provides multi-drop signaling at rates up to 100 Kbaud.
These protocols are summarized on this page, but for more information regarding their data formats and their use for simplex or multi-drop serial lines, consult Understanding Serial Communications (but keep in mind that that page is directed to the use of the UART Wildcard, so it uses different driver functions). To use a QScreen as a slave in a multi-drop network, simply define a word, (named Silence(void), for example) that when executed calls RS485Receive() to wait for any pending character transmission to complete, then disable the transmitter, and then execute a routine such as Key() to listen to the communications on the serial bus. The Silence() routine searches the incoming serial characters for a pre-determined keyword (for example, the ascii "name" of this particular slave). If your application requires RS485, you can use the secondary serial port (serial2) to program and debug your application code using the RS232 protocol, and use the primary serial port (Serial1) for RS485 communications.
RS232’s greatest benefit is its universality; most personal computers can use this protocol to send and receive serial data. In summary, the code provided for implementing the second serial port is very flexible and can be used to support dual concurrent communications ports. 1200 is the baud rate that you choose; you can specify any standard baud rate up to 4800 baud. The two lowest order bits in the SPCR control register, named SPR1 and SPR0, determine the data exchange frequency expressed in bits per second; this frequency is also known as the baud rate. The master and slave could even exchange ascii QED-Forth commands. In either of these cases, a source of noise that caused one bit to be received incorrectly would invalidate the received byte, since the total number of '1' bits would be odd rather than even. Two RS485 transceivers are present on the PDQ Board, one for each channel. The PDQ Board, however, does not implement hardware handshaking. Many terminals and PCs, however, do rely on hardware handshaking to determine when the other party (in this case the PDQ Board) is ready to accept data.
By connecting pairs of these handshaking signals together, the terminal or PC can be made to think that the PDQ Board is always ready to send and receive data. Rather, it relies on software handshaking via transmission of XON/XOFF characters (ascii 0x11 and 0x13, respectively) to coordinate data transfer and ensure that information is not lost when one of the communicating parties is busy. 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. Since both channels can operate simultaneously and independently, serial debugging can be performed while the application program is communicating via its primary channel. It requires minimal wiring and can share the wiring among several seats, reducing weight. Note that the local and the remote must share a common ground, so a minimum of 3 wires are required for full duplex RS232 communications: a transmit wire, a receive wire, and a common ground.
If you cherished this article and also you would like to get more info concerning rs485 cable nicely visit our website.
- 이전글무료몰카비디오 오랄아줌마 보는곳 (hd_보기)ox다운_로드 ver #무료몰카비디오 오랄아줌마 무료보기 24.07.15
- 다음글무료망가보드게시판 야한 만화캐릭터사진 보는곳 (hd_보기)ox다운_로드 ver #무료망가보드게시판 야한 만화캐릭터사진 무료보기 24.07.15
댓글목록
등록된 댓글이 없습니다.