Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] 1.0.0 COMMUNICATION PROTOCOLS RE: RS-232, RS-422, and RS-485 1.1.0 RS-232 Application Notes RS-232 was approved as a standard interface in 1969. Before and since that time, this interface in its various revisions has been very popular despite its many shortcomings and usage outside of its intended role. Most small computers have an RS-232 interface as standard, or easily added, and many peripherals and instruments support its serial interface, but not all in the same way. Hence the application of an RS-232 needs careful study of equipment manufactures connections and methods before the 485 Adapter is installed. However, RS-232 lines are quite safe if wrongly connected, so the experimental use of a break-out box or ‘hit and miss’ methods of establishing communications can be employed. 1.1.1 Electrical Levels When checking out serial communications circuits, it is useful to know what signal levels to expect. The specified voltage levels of RS-232 data and control signals are summarised in the following table: Interchange Voltage Binary State Data Signal Control Function -3 to –15 1 Marking OFF +3 to +15 0 Spacing ON Signal Ground is at 0 volts and the region between –3 and +3 volts is the transition region. The 485 Adapter will normally be used in close proximity to the RS-232 port, but in case where it is not close, the following limits apply. The electrical levels at which RS-232 operates limit the maximum data rate to about 20 kilobaud (sometimes used up to 50 kb) and the maximum cable length between transmitter and associated receiver to about 15 metres (50 ft). 1.1.2 9/25 Way Adapters 9 Way ‘D’ Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 FIG. 1.1 DCD RxD TxD DTR Sig GND DSR RTS CTS R 25 Way ‘D’ Pin 8 Pin 3 Pin 2 Pin 20 Pin 7 Pin 6 Pin 4 Pin 5 Pin 22 DTE ADAPTOR – 9 Way to 25 Way Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] The wiring list in figure 1.1 shows the necessary connections to adapt a 9 Way RS-232 port to a 25 Way RS-232 port, or vice versa. Due note should be taken to the gender of the mating connector, and a gender change can be incorporated in the adaptor if required. There is no unassigned pin available on the 9 Way connector for connecting the power supply. 1.2.0 RS-422 / 485 Application Notes RS-422 and RS-485 have very similar characteristics, with RS-485 being compatible with, and offering all the advantages of RS-422 plus some additional capability. RS-422 pre-dated RS-485 as a standard, but RS-485 is now more popular and used in new system design. For the 485 Adapter, the on board circuitry for the two models is identical, the application deciding the mode of interface operation. 1.2.1 RS-422 / 485 Parameters The following table summarises the principal parameters of the RS-422-A and RS-485 standards, and shows RS-232-C for comparison. EIA STANDARD RS-232-C RS-422-A RS-485 Mode of operation Single-ended Differential Differential Number of Drivers On Line Number of Receivers On Line Max. Cable Length - m Max. Data Rate-Bits/s Max. Common Mode Driver Voltage 1 Driver 32 Receivers 15 20K N/A ±5v to ±15v 1 Driver 10 Receivers 1200 10M .+6v, -0.25v ±2v min. 32 Drivers 32 Receivers 1200 10M .+12v, -7v ±1.5v min. FIG. 1.2 1.2.2 RS-232/422/485 PARAMETERS Bus Termination For proper operation of the RS-422/485 bus is full of half duplex, multi-drop or point to point communication, it is recommended that termination is applied to the receiver end of the data lines. The simplest form of termination is line to line with typically a 120? resistor across differential input, and this terminator resistor is available on the 485 Adapter board, selectable by J6 and/or J7 as appropriate. the In a multi drop system, the terminator resistor is only required at the device receiver located at the far end of the cable. If this is in half duplex operation, then both ends of the bus cable are equipped with receivers (transceivers) so termination is necessary at both ends. RS-485 transmitter circuits are specified as being capable of driving a minimum load resistance of 60?, so no more than two transmitter resistors should be connected to any one bus. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] In some instances, particularly in RS-485 multi-drop operations, noise may be detected at the receiver. In the multi-drop configuration, there can be brief periods when on transmitter is 1.2.3 Cabling of RS-422/485 Bus RS-422/485 employs a differential method of signal transmission and each bus cable has to be a wire pair, preferably twisted and screened to keep induced noise to a minimum. The bus distribution cable is effectively a transmission line and appropriate techniques should be used for installation of the cables. In a multi-drop environment the cable should be looped through each device, or if a spur is necessary, the spur length should be kept to a minimum. Maximum end-to-end cable length and the communication baud rate are not mutually exclusive. Typical maximum transmission rates versus cable lengths are shown in the following table: Transmission Rate Maximum Distance 100 Kilobaud 1000 Kilobaud 10000 Kilobaud 1500 metres 100 metres 10 metres If screened cable is used, some thought must be given to the connection of the screen. This screen should not normally be used as a ground return for non-isolated devices and it is safest to only connect the screen at a single point to the ground of one device. The voltage between the grounds of the various devices must not cause the common mode voltage rating of any device on the bus to be exceeded. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] DATA DISPLAY COMMUNICATION PROTOCOLS INTERFACES: RS232: Short distances only. The specification supports transmission of the data up to a distance of 15 metres. 3 wire connection only required. RS485 (optional) : Suitable for distances of 1500 metres or less. Maximum of 32 units on one multidrop. Can use a four wire (RS422) or a two wire (RS485) method. Note: Depending on the software used by the client it maybe necessary to use a full modem at the PC. This can be achieved by connecting Pins 1,4, and 6 together and separately connecting 7 and 8. (Dtype 9way). This simulated the busy signal as if the PC is connected to a printer. RS232 Connection DB25way DB9way 3.5mm stereo 5pin cannon 3 (Rx) 2 (Tx) 7 (Grnd) 2 (Rx) 3 (Tx) 5 (Grnd) Tip (Tx) Center (Rx) Base (Grnd) 1 (Tx) 2 (Rx) 3 (Grnd) Default Communication Rate Baudrate Data Parity Stop Bit = 9600 Baud for DataBoard and 1200 Baud for DataLine displays = 8 Bit = None = 1 Bit The above Baudrates are the standards supplied by Data Display. Other Baudrates from 300 Baud to 9600 are supplied on request or may be made selectable. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] TABLE OF CONTENTS Page No. 1. Introduction 1 2. Dumb/Terminal Mode Protocol For Data Board Display (With Error Checking and without Error Checking) 2–5 3. Data Board Protocols 6-9 4. Serial Protocols For Data Line and Biline Displays 10 – 13 Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] INTRODUCTION Dumb/Terminal Mode Protocol for Data Board Displays This protocol is designed to facilitate application engineers to write their own software to take easy control of the display in a real time application. It has limited display functions but is very suitable for factory applications, sports applications and alarm signals. There are two type of protocols available within this section. One does not require any error checking whilst the other requires more effort from the programmer in terms of error checking and handling responses. Data Board Protocols This protocol is based on 5 different sections which the user may access when transferring information to the display. This protocol should be used when a client wishes to use a display as a variable messaging system with full feature effects and multiple page facility. Serial Protocols for Data Line and Biline Displays The following protocols detail how to avail of the multiple features for multiple pages in either single system displays or a network of units. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 1 of 13 DUMB/TERMINAL MODE PROTOCOL FOR DATA BOARD DISPLAYS (Version DB Dum 1.0) (Error Checking Included) Release Date = 4 July 1996 1. SCOPE This protocol is designed to facilitate application engineers to write their own software to take easy control of the display in a real time application. It has limited display functions but is very suitable for factory applications, ACD applications, sports applications and alarm signals. The display can be updated in the following manner; 1) Full page update 2) Line update 3) Word update 4) Character update Only one page is ever displayed making it suitable for real time applications. 2. FEATURES The following commands are effective on the display; 1) Any character line or word may flash 2) Update of display is totally ‘silent’. No apparent jumping or flicker on display. 3) Time may be displayed on any part of display. 4) Irrespective of the number of displays used, by sending a single byte control, all displays will update at once. 5) Extended ASCII set is used. Baud Rate 300 – 9600 Baud Data Format is 8 bit, 1 stop bit, no parity. $0F $20 + Address of unit $0E $02 $20 + Buffer position $** $03 $08 $xx $yy $09 Initiate address mode Can also be grouped (Labelled on Unit) Terminate address mode Initiate text mode Start of area of display to be changed (first is 21) Any number of text bytes Terminate text mode Initiate Checksum Command Checksum MSB Checksum LSB Terminate Comms Where $xx and $yy are a two Byte checksum which is calculated on all Bytes from the $OF to the $08 (inclusive) summed together with carry being ignored. On transmission the most significant of each checksum Byte should be forced high. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 2 of 13 A Checksum of and $XX = $AA $YY = $AA will always result in checksum ignored. A wrong checksum will result in a NAK response whilst correct checksum will result in an ACK unit response. (No further transmission for 500m Sec) $01 $2X $06 $15 $03 Initiate Response Address of Unit Transmission OK Transmission Failure Terminate Response Turn Flash ON Turn Flash OFF Flash Effect: $05 $06 The flash commands can be entered at any stage of the text and repeated any number of times. **HEU located as a text string within the text will display hours and minutes in the selected position. 3. Time Effect To set the time the following string should be sent: $0F, $20, $0E, $04, $Hour, $Hour, $Min, $Min, $Sec, $Sec, $30, $34, $03, $09 4. Colour Effect This only applies to Multicolour versions of the Data Board. $11 $12 $13 Colour 1 Colour 2 Colour 3 The three colours are Red, Green and Amber. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] These control bytes can be located anywhere within the text string. Page 3 of 13 DUMB/TERMINAL MODE PROTOCOL FOR DATA BOARD DISPLAYS (Version DB Dum 0.1) (No Error Checking) Release Date = 1-JAN-1995 1. SCOPE This protocol is designed to facilitate application engineers to write their own software to take easy control of the display in a real time application. It has limited display functions but is very suitable for factory applications, ACD applications, sports applications and alarm signals. It does not require checksum calculations and the display will not give an acknowledgement. The display can be updated in the following manner; 1) Full page update 2) Line update Only one page is ever displayed making it suitable for real time applications. 2. FEATURES The following commands are effective on the display; 1) Any character line or word may flash 2) Update of display is totally ‘silent’. No apparent jumping or flicker on display. 3) Time may be displayed on any part of display. 4) Irrespective of the number of displays used, by sending a single byte control, all displays will update at once. 5) Extended ASCII set is used. Baud Rate 300 – 9600 Baud Data Format is 8 bit, 1 stop bit, no parity. $0F $20 + Address of unit $0E $02 $20 + Buffer position $** $03 $09 Initiate address mode Can also be grouped (Labelled on Unit) Terminate address mode Initiate text mode Start of area of display to be changed (first is 21) Any number of text bytes Terminate text mode Terminate Comms Turn Flash ON Turn Flash OFF Flash Effect: $05 $06 Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] The flash commands can be entered at any stage of the text and repeated any number of times. **HEU located as a text string within the text will display hours and minutes in the selected position. Page 4 of 13 3. Time Effect To set the time the following string should be sent: $0F, $20, $0E, $04, $Hour, $Hour, $Min, $Min, $Sec, $Sec, $30, $34, $03, $09 4. Colour Effect This only applies to Multicolour versions of the Data Board. $11 $12 $13 Colour 1 Colour 2 Colour 3 The three colours are Red, Green and Amber. These control bytes can be located anywhere within the text string. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 5 of 13 DATA BOARD PROTOCOLS (Version DBWIN 1.0) Release Date = 4 July 1996 All test characters represented in Standard ASCII. Data Transfer 1. Structure This protocol is based on 5 different sections which the user may access when transferring information to the display. This protocol should be used when a client wishes to use a display as a variable message system with full feature effects and multiple page facility. Default settings are 9600, N, 8, 1, Standard ASCII. Sample Format: Address Unit Section 1 Section 2 Section 3 Section 4 Section 5 Terminate 2. } Required Unit is Selected } Text and Command Transfer } Timed Text Transfer } Time Transfer } Date Transfer } Dim Timed Transfer } Checksum Control and Acknowledgement Protocol Section 1: Text and Command Transfer ($) indicates hex value $0F $20 + Address of Unit $OE $02 $5C $30 $31 $31 - $39 Indicate Address Mode $21 = Unit 1 ? $20 = Global Terminate Address Mode Initiate Text Mode ($01 initiate text mode and disable all pages) Begin Page Sequence and Command Sequence Page Number Tens Page Number Units Command Section $31 = Jump $32 = Vertical $33 = Open Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] $34 = Flash $35 = Random $36 = Time/Date $37 = Sparkle $38 = Freeze Page 6 of 13 $31 - $33 Front Type $31 = Normal $32 = Bold $33 = Script $30 - $49 Pause Length $30 = Page Off $31 = 1 sec delay $49 = 19 sec delay $3A End Command Sequence and Enable Text Transfer $XX…….$XX Text String Continues For Page Size $03 End of Text Transfer SECTION 2: Timed Text Transfer $04 $5C $30 $31 $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx $xx Initiate Timed Text Mode Begin Page Sequence Page Number Tens Page Number Units Start Month Tens ------Start Month Units | Start Date Tens | Start Date Units | Start Hour Tens | Start Hour Units | Start Minute Tens | Start Minute Units | Stop Month Tens | Stop Month Units | Stop Date Tens | Stop Date Units | Stop Hour Tens | Stop Hour Units | Stop Minute Tens | Stop Minute Units | Start Day | Stop Day ----------------- $03 Terminate Timed Text Mode Repeated Twice Total 54 Bytes As there is 3 Options of Timed Text per page. All 54 Bytes must be Transmitted. Asterisks denote always valid Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 7 of 13 SECTION 3: $05 $3x $3x $3x $3x $3x $3x $03 SECTION 4: $06 $3x $3x $3x $3x $3x $3x $3x $03 SECTION 5: $07 $3x $3x $3x $3x $3x $3x $3x $3x $03 Time Transfer Time Update Hours Tens Hours Units Minutes Tens Minutes Units Seconds Tens Seconds Units Terminate Time Mode Date Transfer Date Update Years Tens Years Units Months Tens Months Units Date Tens Date Units Day of Week Terminate Date Mode Dim Timed Transfer Dim Timed Start Hours Tens Start Hours Units Start Minutes Tens Start Minutes Units Stop Hours Tens Stop Hours Units Stop Minutes Tens Stop Minutes Units Terminate Dim Timed Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 8 of 13 3. Termination of File Transfer After the last section has been transmitted it is necessary to send the closing sequence. $08 $xx $yy $09 Initiate Checksum Command Checksum MSB Checksum LSB Terminate Comms Where $xx and $yy are a two Byte checksum which is calculated on all Bytes from the $OF to the $08 (inclusive) summed together with carry being ignored. On transmission the most significant bit of each checksum Byte should be forced high. A Checksum of $XX = $AA and $YY = $AA will always result as checksum ignored. A wrong checksum will result in a NAK response whilst correct checksum will result in an ACK unit response. (No further transmission for 500m sec). $01 = Initiate Response $2X = Address of Unit $06 = Transmission OK $03 = Terminate Response and $15 = Transmission Failure Note: (1) Text Transfer of a page will automatically clear any previous Time Text section of that page. Therefore if a page is intended to be displayed continuously, it is not necessary to transfer any Timed Text. (2) Multiple pages can be transferred by repeating the afore mentioned procedure with page number selected. (3) Pages need NOT be transmitted in sequence (4) To clear down memory or existing text removal, the following sequence should be sent: $OF $20 + Address = Address of Unit Initiate Address Mode the Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] $0E $10 $09 Terminate Address Mode Terminate Sequence Terminate Comms This should be done if a new EPROM has been installed. No further transmissions should take place for a period of 1 second. Page 9 of 13 SERIAL PROTOCOLS FOR DATA LINE AND BILINE DISPLAYS (Version D2.0) Release Date = 4 July 1996 The following protocols detail how to avail of the multiple features for multiple pages in either single system displays or a network of units. 1. General To reset a unit: \sqy To address one unit: \aNN\\ (NN = address of unit) To address all units: \a\\ 2. This command clears all memory in the units selected. A two second delay should be incorporated after this command. Set-up Protocols To set the Time and Date on the selected units the following protocols are used: To set the hours figure: \st109 (9.00 am) To set the minutes figure: \st235 (9.35) To set the seconds figure: \st345 (9.35.45) To set the day of the week: \sd0N (N = 1 to 7, 1 = Monday) To set the date: \sd112 (12th) To set the month: \sd203 (March) To set the year: \sd393 (1993) To back up all text: \sb 3. Edit Commands This command backloads the text from the limit to the PC. Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] The display contains 99 text of up to 500 characters per text. To select a text and how the character will appear in that text are outlined below. To select a text number: \vNN (NN = text 01 to 99) To clear a text: \q Page 10 of 13 Note: This command must be entered before editing can commence. After the ‘\q’, text can be entered at will. To enter commands or to change the appearance of subsequent text, the following protocols may be used. To change direction of scrolling: \rN (N = 1 = > right to left scrolling) (N = r = > left to right scrolling) To generate flashing text: \fN (N = y = > turns flashing on) (N = n = > turns flashing off) Note: For units of greater than 20 characters in width neither of the above two commands will operate in scrolling mode. To enter the time: \tN (N = 1 to 4 for different formats) N = 1 = > HH:MM:SS e.g. 10:15:37 N = 2 = > HH:MM e.g. 10:15 N = 3 = > +00.0°C N = 4 = > +00°C To enter the date: To change the font type: For Single Colour Unit 1 = Normal Font 2 = Wide Font \dN (N = 1 to 4 for different formats) N = 1 = >DD/MM/YY e.g. 10/11/92 N = 2 = >DD/Month/YY e.g. 10/November/92 N = 3 = >Day, e.g. Thursday N = 4 = >Week no. e.g. 44 \zN (N = 1 to 9 represent different fonts, colours or heights of characters depending on the unit. For Multi Colour Unit 1 = Normal Amber 2 = Normal Green For Biline Unit 1 = 12*16 Font 2 = 6*7 Top Line Font Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] 3 = Compressed 4 = Bold 5 – 9 = Not Applicable 3 = Normal Red 4 = Wide Amber 5 = Wide Green 6 = Wide Red 7 = Compressed Amber 8 = Compressed Green 9 = Compressed Red Page 11 of 13 To enter a graphic character: \gN To enter an ON command: \xN To enter an OFF command 3 = 6*14 Font 4 = 6*7 Bottom Line 5 = 6*14 Narrow Font 6 = 12*7 Top Line 7 = 12*14 Font 8 = 12*7 Bottom Line 9 = 12*14 Narrow Flint) (N = 1 to 9 represents the different characters available. 1= user graphic 2= Horse 6= Boat 3= Pacman 7= Plane 4= Car 8= Phone 5= Train 9= Plus Sign) N=s N=v N=b N=d N=u N=w N=j N=l N=m : : : : : : : : : shoot variable background on down up wipe jump lamp on dim on N= p N= f : pause : freeze variable off : background off : down : up : wipe : lamp off : dim off \cN N= v : N= N= N= N= N= N= b d u w l m Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Each text can contain any number of ON and OFF commands which need not be compatible i.e. the DOWN ON command need not be followed by the DOWN OFF command. To end the edit session: \e Page 12 of 13 4. Time Text After ‘\e’ in each text, enter ‘\p’ plus the 3 time text information fields, each comprising 20 bytes arranged as follows: START Date ** ** ** Month ** ** ** Hour ** ** ** STOP START STOP Mins ** ** ** Date ** ** ** Month ** ** ** Hour ** ** ** Mins ** ** ** Day ** ** ** Day ** ** ** ** 18 09 ** 00 00 31 01 ** 08 12 ** ** 00 17 ** 30 00 * * 1 GOTO Page ** ** ** Some Examples: 1. 2. 3. 01 30 ** 05 11 ** * * 5 ** 56 ** 1. Run from 1 May to 31 August. 2. Run from 6:00 pm on 30 November to 0:30 am the following morning, and then jump text page 56. 3. Run text each Monday through to each Friday from 9:00 am to 5:00 pm. to N.B. – It is not necessary to transmit all 60 bytes per text, only as many as are required. However, void or null bytes must be entered as ‘*’ (i.e. ASCII 2A). For instance in example 1, **** must be transmitted between 0105 and 3108. To run the selected text or combinations of text: \r Microstar Informationsteknik ApS – Borgergade 20 – 1300 Kbh. K. – Tlf.: 33 93 09 19 – [email protected] Page 13 of 13