What is Serial Communication? > 자유게시판

본문 바로가기

사이트 내 전체검색

한누비IT

닫기

What is Serial Communication?

작성일 24-07-29 13:39

페이지 정보

작성자Jerold 조회 2회 댓글 0건

본문

The QED-Forth kernel includes pre-coded drivers that configure the SPI for maximum speed data transfer using a format that is compatible with the on-board D/A and 12 bit A/D. Pre-coded device drivers configure the SPI for a standard data format, and routines defined in this chapter make it easy to customize a data format and baud rate for your application. There are several protocols that govern the format of exchanged data, with the RS232 protocol used primarily by personal computers, and the RS485 protocol used in industrial control systems. In this situation, if the /SS input is pulled low while the 68HC11 is the master, the processor detects a "mode fault" (by setting a bit in the SPI status register) meaning that there is more than one master device on the SPI bus. When this bit is high, the transceiver is in transmit mode. If the /SS pin of the master is an input and if a low input level is detected, the processor sets the MODF bit in the SPI status register a "mode fault" condition. This allows the processor that is master to control the input /SS pins of other CPU’s, for example. The QVGA Controller’s on-board 12 bit A/D and 8 bit D/A converters communicate with the processor via the SPI.


RS232 uses inverse logic; that is, a positive bit at the 68HC11 UART is inverted by the onboard RS232 driver chip and appears as a negative signal on the serial cable. 5 Volt supply by a dual RS232 driver chip that has a built-in charge pump voltage multiplier. RS232 is by far the most common protocol. Ultimately, it can be thought of in a way that serial communication is more made for this usage as compared to the common USB and ethernet. It converts a USB port to use with RS485. The RS232 protocol specifies the use of two separate grounds, a signal ground and a protective (or "chassis") ground. Connecting a standard full duplex link RS232 between two computers is the same as with a standard RS232 link, with the TxD (transmitter output) of each computer connected to the RxD (receiver input) of the other computer. RS232 allows both communicating parties to transmit and receive data at the same time; this is referred to as full duplex communications. When a slave is addressed, it executes RS232Transmit() at which point full duplex (two-way) communications commences between the master and the selected slave.


Thus RS485 is the standard protocol of choice when multi-drop communications are required. Figure 11 1 shows a typical multi-drop communications network. To properly operate the network each slave computer executes RS232Silent at startup; thus all of the slave transmitters remain silent individually addressed by the master. The RS485 communication interface allows the slave unit (i.e. control module) to be interrogated and some options programmed by a remote computer. The 68HC11 allows the details of the synchronous communications protocol to be customized for compatibility with a variety of peripherals. This signal synchronizes the exchange of bytes between the QScreen and its peripherals. It receives bytes sent by a slave device via the "master in/slave out" pin, MISO. Hardware is interfaced to the SPI via four PORTD pins named /SS, SCK, MOSI, and MISO brought out to pins 11 through 14 on the Digital I/O connector (see Appendix A). The RS485 connections are not brought out to the Serial 1 Connector. Most computers conform to IBM PC AT-compatible RS232 interfaces which use 9-pin D-Type connectors, consequently the QScreen Controller brings out its serial ports to two female 9-pin D-Type connectors.


There are surface mount resistor pads on the QScreen that will allow you to bring out the secondary serial port to the Field Header on pins 5-6 or 7-8 as shown with the parentheses in Table 11-3. Pads are also available to bring out the RS485 signals to the DB9 Serial 1 Connector. Any required SPI output signals must be configured as outputs by setting the appropriate bits in the Port D data direction register which is named PORTD.DIRECTION in the QED-Forth kernel. It is important to note that when the CPHA bit is 0, the /SS line must be de-asserted and re-asserted between each successive data byte exchange (M68HC11 Reference Manual, p.8-3). They must all have a green light. In fact, the program works the same as it did before, but now it is using the secondary serial port instead of the primary port -- and you didn’t even have to recompile the code! Since both channels can operate simultaneously and independently, debugging can be performed while the application program is communicating via its primary channel. Rather, it relies on software handshaking via transmission of XON/XOFF characters to coordinate data transfer and ensure that information is not lost when one of the communicating parties is busy.



If you loved this information and you would like to obtain even more information pertaining to what is rs485 cable kindly see our own web-site.

댓글목록

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.
상단으로