The text of a manual · part 12 of 18
User's Manual (BHT-5000): Chapter 3 Communications Operations of BHT-5000, pages 84 to 92
Pages 84 to 92 of 143, from User's Manual (BHT-5000)
The original document is the PDF (1.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the NipponDenso BHT-5000 and Denso BHT-5000
Page 84
Chapter 3. Communications Operations of BHT-5000
Chapter 3 Communications Operations of BHT-5000
This chapter describes the communications operations of the BHT-5000--the RS-232C interface specifications, the basic communications specifications, and the BHT-protocol--for data transmission with the host computer or other devices.
3.1
RS-232C Interface Specifications .................................................................................... 70
3.1.1
For CU-5000 ................................................................................................................. 70
3.1.2
For BHT-5000 ............................................................................................................... 73
3.2
Basic Communications Specifications and Parameters ................................................ 75
3.2.1
Basic Communications Specifications ...................................................................... 75
3.2.2
Communications Parameters ..................................................................................... 78
3.3
BHT-Protocol ..................................................................................................................... 79
3.3.1
Overview ...................................................................................................................... 79
3.3.2
Control Characters ...................................................................................................... 80
3.3.3
Basic Format of Transmission Messages .................................................................. 82
3.3.4
Transmission Control Sequences .............................................................................. 83
3.3.5
Aborting Data Transmission ....................................................................................... 91
3.3.6
BCC for Horizontal Parity Checking ........................................................................... 92
3.3.7
Text Format .................................................................................................................. 93
69
Page 85
3.1 RS-232C Interface Specifications 3.1.1 For CU-5000 [ 1 ] Interface Connector and Pin Assignment The CU-5000 has an RS-232C interface port (Dsub-25S). 13
1
25
14
RS-232C interface port (Dsub-25S) on the CU-5000
■ CU-5001 Pin No.
Signal
2 3 4 5 7 20
SD RD RS CS SG ER
Functions
Signal Input/Output CU-5001 External device
Send data Receive data Request to send Ready to send Signal ground Data terminal equipment ready
→ ← → ←, →
Pins 1 (FG), 6 (DR), and 8 (CD) are not connected. ■ CU-5002 Pin No.
Signal
1 2 3 4 5 6 7 8 20
FG SD RD RS CS DR SG CD ER
Functions
Signal Input/Output CU-5002 External device
Frame ground Send data Receive data Request to send Ready to send Data set ready Signal ground Carrier detect Data terminal equipment ready, → ←, - - - - - The input/output voltage threshold for the logical valued signal is listed below. Logical Value
Input Voltage Threshold
Output Voltage Threshold
0
3V min.
5V min.
1
-3V max.
-5V max.
70
Page 86
Chapter 3. Communications Operations of BHT-5000
[ 2 ] Interface Cable Connection As illustrated below, connect the CU-5000 (which is joined with the BHT-5000) to a host computer with a cross-mode cable. To connect it to a modem, use a straight-mode cable. Host Computer (DTE)
CU-5000 (DTE)
1
FG SD RD RS CS DR SG CD ER
2 3 4 5 6 7 8 20
Cable Connection between CU-5000 and Host Computer
Modem (DCE)
CU-5000 (DTE)
1
FG SD RD RS CS DR SG CD ER
2 3 4 5 6 7 8 20
Cable Connection between CU-5000 and Modem
DTE and DCE In the RS-232C interface specifications, the DTEs (Data Terminal Equipment) shall be generally connected with each other by a cross-mode cable; the DTE and DCE (Data Circuit-terminating Equipment) shall be connected with each other by a straight-mode cable. The DTE is one piece of equipment connected at both ends of a communications line as a sender or receiver of data (such as CU-5000 joined with the BHT-5000 and a host computer). The DCE is one piece of equipment connected to the intermediate point between the DTE and the communications line. It terminates communications lines and exchanges information between those lines without any change in contents (such as modem).
71
Page 87
NOTE
The CU-5002 generates its internally consumed power by way of the signals sent by the connected host computer, the modem, or other devices. Shown below is a diagram of the internal connection in the CU-5002. Host computer, modem, or other devices
CU-5002
Signal Name
Pin No.
FG
1
SD
2
RD
3
RS
4
CS
5
DR
6
ER
20
CD
8
SG
7
Optical Interface Not used. RS-232C Interface Circuitry
Power Supply Circuitry
72
Optical Communications Interface Circuitry
BHT-5000
Page 88
Chapter 3. Communications Operations of BHT-5000
3.1.2 For BHT-5000 [ 1 ] Interface Connector and Pin Assignment The BHT-5000 has a direct-connect interface port which is connectable to the 3-pole mini stereo plug (ø2.5 mm or 0.1") and supports a subset of the RS-232C interface as shown below. Using a direct-connect interface cable having the mini stereo plugs makes it possible to connect the BHT-5000 to a host computer (or another BHT-5000) directly without any routing through the CU-5000.
SD
RD
SG
3-pole Mini Stereo Plug (ø2.5 mm or 0.1")
The poles of the plug are assigned as listed below. Signal Name
Function
Signal Input/Output BHT-5000
External device
SD
Send data
→
RD
Receive data
←
SG
Signal ground
The input/output voltage threshold for the logical valued signal is listed below. Logical Value
NOTE
Input Voltage Threshold
Output Voltage Threshold
(RD)
(SD)
0
3V min.
5V min.
1
-3V max.
-5V max.
The direct-connect interface port is not designed to stand frequent connecting/ disconnecting. Do not plug and unplug basically more than one time a day; otherwise, the service life of the plug will shorten. To connect the BHT-5000 to a host computer (or another BHT-5000) frequently, use the CU-5000.
73
Page 89
[ 2 ] Interface Cable Connection Connect the BHT-5000 directly to a host computer, a modem, or a printer with a directconnect interface cable as illustrated below. BHT-5000 Connector I/F
Host Computer
FG SD RD RS CS DR SG CD ER
SD RD
SG
Cable Connection between BHT-5000 and Host Computer
BHT-5000 Connector I/F
Modem
FG SD RD RS CS DR SG CD ER
SD RD
SG
Cable Connection between BHT-5000 and Modem
BHT-5000 Connector I/F
Printer
FG SD
RD busy(RD)
busy
SG
SG
Cable Connection between BHT-5000 and Printer
74
Page 90
Chapter 3. Communications Operations of BHT-5000
3.2 Basic Communications Specifications and Parameters 3.2.1 Basic Communications Specifications Listed below are the communications specifications when the BHT-5000 transacts data with a host computer through the CU-5000 (optical interface) or direct-connect interface cable. Synchronization
Start-stop
Transmission Speed
300, 600, 1200, 2400, 4800, 9600, 19200, or 38400 bps
Transmission Code
JIS 7-bit/8-bit codes
Transmission Bit Order
LSB (Least significant bit) first
Response Method
ACK/NAK response
Vertical Parity
Even, odd, or none
Transparency
Non-transparent mode
RS/CS Control
Enabled or disabled
■ Synchronization For accurate data transaction, it is very important to synchronize the transmission between the sender and receiver. To do this, it is required to previously define the bit order and position, the character length, and the beginning and end of the character to be transmitted. The start-stop synchronization is an asynchronous system which synchronizes each character as a unit; that is, it externally adds start and stop bits to the leading and trailing bit positions of the character to be transmitted, respectively. A clock starts counting on receiving the start bit and it falls into a non-communication state on receiving the stop bit. The number of the stop bits is selectable (1 or 2 bits).
■ Transmission Speed Maximum number of bits to be transmitted per second. Expressed in bps (bits per second).
75
Page 91
■ Transmission Code and Bit Order All characters should be coded to 7- or 8-bit code for data transmission. The standard data exchange code of the BHT-5000 is JIS 7- or 8-bit code. The transmission bit order is LSB (Least significant bit) first. What follows is an example for transmitting character A (41h, 01000001b) coded to JIS 8-level code with an even parity and a single bit each for start and stop bits. LSB 1
MSB 0
0
0
0
0
1
0
0
Stop bit
Start bit
Parity bit
■ Response Method When two devices initiate communications, they exchange signals for correct data transmission. This procedure is called "handshaking." The sender sends a control code ENQ (05h) to the receiver meaning "Are you ready to receive data?," and the receiver replies to it with a control code ACK (06h) or NAK (15h) meaning "Positive" or "Negative" for starting data transmission, respectively. This sequence is also called "data link establishment phase."
■ Vertical Parity A vertical parity bit is a redundancy bit which is added to every character to be transmitted in order to check that data has been transmitted accurately. The parity bit should be set to "1" or "0" depending upon the parity parameter setting, to make the number of set bits in the character even or odd. The receiver counts the number of set bits in the transmitted character code to make sure that it has the selected number (even or odd) of set bits. The vertical parity bit is positioned immediately following the MSB (Most significant bit) as shown below.
LSB b0
MSB b1 b2 b3 b4 b5 b6
(For 7-bit data) Vertical parity bit
LSB b0
MSB b1 b2 b3 b4 b5 b6 b7
(For 8-bit data) Vertical parity bit
76
Page 92
Chapter 3. Communications Operations of BHT-5000
■ RS/CS Control Depending upon whether the RS/CS control is enabled or disabled in System Mode, the BHT-5000 operation will differ as follows: RS/CS Control
BHT-5000 Operation
Enabled (ON)
If the CS signal is ON when the BHT-5000 is ready to send, the BHT-5000 will send data. If it is OFF, the BHT-5000 will wait for the CS signal to go ON until the timeout occurs. When the BHT-5000 becomes ready to receive data, it will turn the RS signal ON.
Disabled (OFF)
The BHT-5000 does not check the CS signal when starting data transmission. The RS signal is always ON.
NOTE
The timeout length is programmable in user programs written in BHT-BASIC 3.0. If not designated in programming, it is three seconds.
For the RS/CS control in user programs written in BHT-BASIC 3.0, refer to the "BHTBASIC 3.0 Programmer's Manual."
77