Sunteți pe pagina 1din 12

Samsung Eletornics Logic and I/O Products SPC-10/N70Plus/N70/700Plus Series Application Note

N70/700Plus User-Defined Communications Protocols This application note describes in detail to user-defined communications protocols supported by the second program loader port located on the N70/700PLUS CPU. Through the use of internal Flags (F) and System Registers (SR), the second port can be configured to support three separate modes of operation; the N70/700PLUS program loader port protocol (N70/700PLUS mode), the MODBUS RTU slave protocol (MODBUS mode), and the User-Defined ASCII/Binary transmit/receive protocol (UD mode). Port Configuration Communications port #2 on the N70/700PLUS CPU module is user-configurable for a variety of protocols, baud rates, parities, and so on. The port contains line-driver support for both RS232 and RS485 hardware communications. The CPU auto-detects the incoming signal, and uses the correct hardware protocol as required. Refer to the N70/700PLUS PLC Users Manual, Chapter 4, for a detailed pin-out of the 9-pin D-connector. Baud rates supported by Comm. Port 2 are 4800 baud to 38,400 baud. The baud rate at which the port communicates is configured through the use of a bank of dip-switches located on the CPU module, between ports 1 and 2. Table 1 shows the proper dip-switch settings for the given baud rate. Additionally, when using RS-485 communications, the nodes at the end of the RS-485 communications network should always be terminated with impedance matching resistors. These Terminating Resistors match the natural resistance of the communications line, and prevent reflected voltages from disrupting communications along the line. When the CPU module is at the end of the communications line, dip-switches 5 and 6 can be used to properly terminate the network. See Table 1 below.
Switch Number 1 Off 2 3 On Off On 4 Off On Off On Switch Position Off On Off Off On On COM1, 9,600 bps
ON

Function

Diagram

COM1, 19,200 bps COM2, 9,600 bps COM2, 19,200 bps COM2, 38,400 bps COM2, 4,800 bps On: Upload program from the memory pack when the power applied.
DIP1

6 5 4 3 2 1

Terminating resistors for RS485 communications not connected. Terminating resistors for RS485 communications connected.

Table 1A Comm. Port Configuration for N700Plus CPU

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 1

Switch Number 1

Switch Position Off On Off On Off On Off On Off On Off On Off Off On On Off Off On On Off On Off On COM1, 9,600 bps COM1, 19,200 bps COM1, 38,400 bps COM1, 4,800 bps COM2, 9,600 bps COM2, 19,200 bps COM2, 38,400 bps COM2, 4,800 bps

Function

Diagram

8 Pole Dip Switch

Com1:Terminating resistors for RS485 communications not connected. Com1: Terminating resistors for RS485 communications connected. Com2:Terminating resistors for RS485 communications not connected. Com2:Terminating resistors for RS485 communications connected.

4 Pole Dip Switch

Table 1B Comm. Port Configuration for N70Plus CPU Configuration Flags To support the three separate modes of operation for port 2 on the N70/700PLUS CPU, the processor uses two special internal Flags, F11 and F12. Individual bits in these flags set the mode of operation, trigger communications, indicate status of communications, and configure the port parameters. Table 2 below describes each flag bits function in the operation of the port. Flag Bit F11.0 F11.1 F11.2 F11.3 F11.4 F11.5 F11.6 F11.7 F11.8 F11.9 F11.10 F11.11 F11.12 F11.13 F11.14 F11.15 F12.8 F12.9 Function Description Flag Word F11 Request Transmission 0: No operation Indicates Transmission Failure 0: Normal Enables the Start Code in ASCII mode 0: No Start Code Enables the End Code in ASCII mode 0: No End Code Indicates that a message has been received 0: No message Clears the Receive Buffer 0: Normal Indicates a Port Overrun Failure 0: Normal Indicates a Receive Failure (e.g. bad CRC) 0: Normal Enable Conversion of ASCII data to Binary 0: Enabled Ignore Receive Errors 0: Signal Error Enable Parity Setting 0: Disabled Select ODD or EVEN Parity 0: ODD Select the Number of Data Bits 0: 7 Bits Select ASCII or Binary Communications 0: ASCII Reserved Do not use Enable Automatic CRC mode 0: Disabled Flag Word F12 Enable User-Defined Communications (UD) 0: Disabled Enable MODBUS RTU Communications (MODBUS) 0: Disabled Table 2 Communications Flags 1: Start Transmission 1: Transmission Error 1: Start Code Enabled 1: End Code Enabled 1: Message Received 1: Clear Receive Buffer 1: Overrun Error 1: Receive Error 1: Disabled 1: Ignore Error 1: Enabled 1: EVEN 1: 8 Bits 1: Binary 1: Enabled 1: Enabled 1: Enabled State Description

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 2

Communication System Registers In addition to the special Flags used to configure communications, a bank of System Registers (SR298-SR373) is provided for holding the data transmitted and received. The descriptions of the system registers are contained in Table 3 below. System Registers SR298-SR333 SR334-SR369 SR370 SR371 SR372 SR373 Description Explanation Transmit Data Buffer Holds up to 36 words of data to be transmitted Receive Data Buffer Holds up to 36 words of received data Transmit Data Length Number of Bytes to be transmitted Receive Data Length Number of Bytes that have been received Start Code Start code for ASCII Comm. one byte, high byte unused End Code End code for ASCII Comm. one byte, high byte unused Table 3 Communications Registers

Descriptions of Configuration Flags and Registers Each of the Flags and Registers has a specific purpose, based on the mode of communications. The following paragraphs describe in greater detail the operation and use of each flag and register. F11.0 REQUEST TRANSMISSION UD Mode. Once the ladder program has filled the Transmit Data Buffer (SR298 SR333), and set the number of Bytes to send (SR370), the program sets this flag to indicate to the CPU that it is time to send the data. Once the CPU has sent the number of bytes indicated, this bit is automatically reset by the CPU. F11.1 TRANSMISSION FAILURE UD Mode. If the CPU encounters a failure in transmitting the data indicated (e.g. the number of Bytes to send > 72), this flag is set. This flag is not automatically reset, and must be reset by the user program after each occurrence. F11.2 ENABLE START CODE UD Mode. In the ASCII mode of communications, it is possible to define a start code to signal the beginning of a message. Setting this flag enables the Start Code mode of operation. When set, the CPU will look for the Start Code (SR372) on any message received before storing the data into the Receive Data Buffer (SR334-SR369). F11.3 ENABLE END CODE UD Mode. In the ASCII mode of communications, it is possible to define an end code to signal the end of a message. Setting this flag enables the End Code mode of operation. When set, the CPU will look for the End Code (SR373) on any message being received. When the End Code is received, the CPU stops storing the incoming message, sets the Receive Data Length (SR371), and sets the Message Received Flag (F11.4). F11.4 MESSAGE RECEIVED UD Mode. When the CPU has successfully received a complete message, this flag is set to indicate to the user program that a new message is available in the Receive Data Buffer (SR334-SR369). This flag is reset by the CPU after the Clear Buffer Flag (F11.5)

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 3

is set to indicate that the data has been read by the program. Until this flag is reset, no new data can be received. F11.5 CLEAR RECEIVE BUFFER UD Mode. This flag is set by the user program to indicate to the CPU that the received data has been read. When this flag is set, the Message Received Flag (F11.4) is reset, and the data is cleared from the Receive Data Buffer (SR334-SR369). F11.6 PORT OVERRUN ERROR When an error occurs on the Receive port (e.g. more than 72 bytes are received), this flag is set to signal that an overrun error has occurred. The flag will remain set until the user program clears it. F11.7 RECEIVE FAILURE This flag is set whenever an error occurs in the received message (e.g. bad CRC, wrong baud rate, etc.). The flag will remain set until the user program clears it. F11.8 ENABLE ASCII BINARY CONVERSION UD Mode. When this flag is set by the user program, incoming ASCII text values are automatically converted to their binary values. For example, if the hex word value $3130 is received, the equivalent ASCII characters are 10. The ASCII Binary conversion will convert this ASCII data automatically into a single byte value of 10 when it is received. F11.9 IGNORE RECEIVE ERRORS UD Mode. This flag is set by the user program. Setting this flag disables the detection of Receive errors. All data is received as is, and the Receive Error Flags (F11.6, F11.7) are ignored. F11.10 ENABLE PARITY The communications port is capable of being configured for three types of parity checking on transmitted and received messages; odd, even, and none. When this flag is turned Off, the parity is set to None. When this flag is set by the user program, the parity is determined by the Select Parity Flag (F11.11). F11.11 SELECT PARITY This flag sets the parity for communications when the Enable Parity Flag (F11.10) is turned On. When this flag is On, Even parity is used. When it is Off, Odd parity is used. F11.12 SELECT DATA BITS This flag sets the data bit size for communications. When it is Off, 7 bit communications is used. When it is On, 8 bit communications is enabled. F11.13 SELECT ASCII/BINARY UD Mode. In the User-Defined Communications mode, the messages can be transmitted and received in either ASCII mode, or binary mode. This flag sets which mode will be used. When the flag is set, all communications are in binary. Otherwise, ASCII communications is assumed. Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note #9 - 4

F11.14 RESERVED This flag is not currently defined for communications and should not be used or referenced. F11.15 ENABLE AUTOMATIC CRC UD Mode. The CPU is capable of automatically generating a CRC-16 checksum on communications sent and received. When this flag is turned on, the CPU automatically calculates and appends a CRC-16 checksum to the transmit data stored in the Transmit Data Buffer. Additionally, when data is received, the CPU checks the Receive Data Length (SR371), calculates a CRC-16 on the received data, and compares it to the data received at the end of the receive message. If the CRC does not match, the Receive Error Flag (F11.7) is set. F12.8 ENABLE USER-DEFINED (UD) COMMUNICATIONS Setting this flag enables port 2 of the CPU to support ASCII/Binary transmit and receive functions. It also necessarily disables the standard N70/700PLUS Program Loader Port protocol support on the port. F12.9 ENABLE MODBUS RTU SLAVE COMMUNICATIONS When this flag is set, port 2 of the CPU is configured to support the open industry-wide MODBUS RTU slave protocol. Peripheral devices can communicate to the N70/700PLUS CPU using the standard MODBUS RTU communications for reading and writing data. Setting this flag disables the standard N70/700PLUS Program Loader Port protocol support for port 2. Description of Operation UD Mode When the PLC is configured for the User-Defined Communications mode, the following order of operation should be followed by the user program for Transmit/Receive sequences: 1) 2) 3) 4) 5) 6) 7) 8) Set the proper configuration flags for the mode of operation desired (F12.8, F11.2, F11.3, 11.8, F11.10, F11.11, F11.12, F11.13, F11.15). See Table 2 above. Set the Start Code (SR372) and End Code (SR373) as required by the application. Fill the Transmit Data Buffer (SR298-SR333) with up to 36 words of data to be transmitted. Set the Transmit Data Length (SR370) indicating the number of bytes to send. Set the Receive Data Length (SR371) indicating the expected number of bytes in the response. Set the Request Transmission Flag (F11.0) to begin transmission of the data. When the CPU has finished it will reset the Request Transmission Flag (F11.0). As data is received, it will be placed in the Receive Data Buffer (SR334-SR369). When the number of bytes indicated by the Receive Data Length (SR371) have been received, the CPU will set the Message Received Flag (F11.4). After moving and using the received data as required, clear the Receive Data Buffer (SR334-SR369) by setting the Clear Buffer Flag (F11.5). The CPU will reset the Message Received Flag (F11.4) Repeat steps 3 through 10 as required by the application.

9) 10) 11)

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 5

Description of Operation MODBUS RTU mode When configured for operation as a MODBUS RTU slave (by setting the Enable MODBUS Flag F12.9), the N70/700PLUS communication port supports the open standard MODBUS RTU slave instructions shown in Table 4 below. Command Code (Hex) Description Read Coil 01 Read ON/OFF status of logic coil(s) Read Input 02 Read ON/OFF status of discrete input(s) Read Holding Register 03 Read value of internal register(s) Read Input Register 04 Read value of input register(s) Write Coil 05 Write single logic coil to ON/OFF Write Register 06 Write value into single internal register Read Exception 07 Read internal status register (special) Write Multiple Coils 15 Write multiple logic coils to ON/OFF Write Multiple Registers 16 Write values into multiple internal registers Report Slave ID 17 Report Slave node address on network Table 4 Supported MODBUS RTU Slave Commands Register Addressing Map shown in Table 5 below Type R L M K F TC W SV PV SR Range R0-R127, 128 words L0-L63, 64 words M0-M127, 128 words K0-K127, 128 words F0-F15, 16 words TC0-TC255, 256 bits W0-W2047, 2048 words SV0-SV255, 256 words PV0-PV255, 256 words SR0-SR511, 512 words Bit Address 0 - 2047 2048 - 3071 3072 5119 5120 7167 7168 - 7423 7424 - 7679 N/A N/A N/A N/A Word Address 0 - 127 128 191 192 319 320 447 448 463 464 - 511 512 2559 2560 2817 2816 - 3071 3072 - 3583 Remark I/O Contact Link Register Internal Register Keep Register Flag Register Timer/Count contact Word working Set value for TC Present value for TC System status

Table 5 - Address Map for Modbus Protocol Communication port signal map shown in Table 6 below Pin Number 1 2 3 4 5 6 7 8 9 Functions Frame ground RxD TxD RTS Signal ground RS-485+ RS-485CTS +5VDC Description Receive Data Transmitte Data Request to Send (Level H when transmitte data)

Clear to Send (Reserved for future) +5V power for RS232/485 Adaptor Table 6 - Port Signal

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 6

Example Program N70/700PLUS Master on SPC-10 Network One of the special features of the User-Defined Communications mode is the ability to act as a Master on a network of Cutler-Hammer SPC-10, N70PLUS and/or N70/700PLUS PLC slaves. Using the Binary mode of communications, in conjunction with the Automatic CRC generation, the second port on the N70/700PLUS can be programmed to transmit and receive messages to a network of PLCs using the SPC-10/N70PLUS/N70/700PLUS standard program loader port protocol. The following program illustrates this technique. In the program, a single word of data is continuously transmitted from the N70/700PLUS master PLC to a single SPC-10 slave node. The message to perform this Write Word(s) function is created using the open protocol information available in the Appendix of the N70/700PLUS PLC Users Manual. The protocol information is also available in the SPC-10 Hardware Manual.

+ master +

N70/700PLUS Master Communications Program This program demonstrates the User-Defined Communications functions + of the N70/700PLUS CPU 2nd port by configuring the N70/700PLUS PLC to act as to a SPC-10 PLC. One word of data is continuously written to the SPC-10. + SPC-10 communications follow a 4-step procedure: a QUERY is transmitted, a QUERY ACKNOWLEDGE is received, a RESPONSE REQUEST is transmitted, and a RESPONSE is received. In this example, the Query contains the + data to be written to the SPC-10 - the other 3 messages are handshaking. + First, the second port is configured: F11.13 sets the Binary mode, F11.15 turns on CRC calculation, F12.8 enables the User-Defined mode, + and word K0 and flags M0.0, used for sequencing, are intialized. F001.0 F011.13 3+-- +-----------------------------------------------------------(SET)-- 1ST_SCAN ASCI/BIN First ASCII or+ Scan On Binary F011.15 4+ +-------------------------------------------------------(SET)--+ ENAB_CRC Enable CRC Mode F012.8 5+ +-------------------------------------------------------(SET)-- ENAB_UD Enable UD Comm. M000.0 6+ +-------------------------------------------------------(RST)-- MESSAGE1 First Message M000.1 7+ +-------------------------------------------------------(RST)-- MESSAGE2 Second + Message +- LET --------------+ 8+ +-------------------------------------D =K0000 COMM_STP+-+ S =0 +----------------------+

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 7

F011.4 +- CALL --------------+ 10+-- +-----------------------------------------SL=10 +- MSG_RCVD Message Received +----------------------+ F011.5 11+ +-------------------(SET)-- CLR_RECV Clears + Rec. Bfr + This rung checks to see if its time to send the first message (QUERY) - if so, Subroutine 0 is called to create the message. Once it has + been created, the Request Transmission Flag (F11.0) is set along with + a flag (M0.0) and timer (TC64) to keep track of where we are. +---COMM_STP--+ F011.0 F011.4 M000.0 +- CALL --------------+ 13+- K0000 +----/+------/+------/+-----SL=0 +- == 0 REQ_TRNS MSG_RCVD MESSAGE1 +-------------+ Request Message First Transmit Received Message +----------------------+ F011.0 14+ +-------------------(SET)-- REQ_TRNS Request Transmit M000.0 15+ +-------------------(SET)-- MESSAGE1 First + Message M000.0 +-TIM---------+ 16+ +-- +--------------------------------T CH=64 +-+ MESSAGE1 SV=30 First +-------------+ Message + This rung checks to see if its time to send the next message (Resp. Req). If so, Sub 1 is called to create the message. Once it has been created, the Request Transmission Flag (F11.0) is set along with + a flag (M0.1) and timer (TC65) to keep track of where we are. +---COMM_STP--+ F011.0 F011.4 M000.1 +- CALL --------------+ 18+- K0000 +----/+------/+------/+-----SL=1 +- == 1 REQ_TRNS MSG_RCVD MESSAGE2 +-------------+ Request Message Second Transmit Received Message +----------------------+ F011.0 19+ +-------------------(SET)-- REQ_TRNS Request + Transmit M000.1 20+ +-------------------(SET)--+ MESSAGE2 Second Message M000.1 +-TIM---------+ 21+ +-- +--------------------------------T CH=65 +- MESSAGE2 SV=30 Second +-------------+ Message

+ +

Next, the Message Receive Flag is continuously checked. If this flag is set, the program jumps to Subroutine 10, which determines which response has been received (QUERY ACK or RESPONSE) and goes on to the next step in the communications sequence, clearing the buffer (F11.5)

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 8

TC064 M000.0 F011.5 23+-- +------ +--------------------------------------------------(SET)-- TIMEOUT1 MESSAGE1 CLR_RECV Timeout First Clears + timer 1 Message Rec. Bfr M000.0 24+ +----------------------------------------------(RST)--+ MESSAGE1 First Message +- INC --------------+ 25+ +----------------------------D =K0001 ERR_CTR1+- +----------------------+ + This rung also checks a 3-second timeout timer (TC64) to make sure that we have not lost communications after the second message (ResponseRequest). If the timer times out, the program resets itself + to try again automatically, and increments an error counter K2. TC065 M000.1 F011.5 27+-- +------ +--------------------------------------------------(SET)-- TIMEOUT2 MESSAGE2 CLR_RECV Timeout Second Clears + timer 2 Message Rec. Bfr M000.1 28+ +----------------------------------------------(RST)--+ MESSAGE2 Second Message +- LET --------------+ 29+ +----------------------------D =K0000 COMM_STP+- S =0 +----------------------+ +- INC --------------+ 30+ +----------------------------D =K0002 ERR_CTR2+- +----------------------+ + Subroutine 0 creates the first message (QUERY), which is a Write Word message. The message is 010304040002 Hex (see N70/700PLUS PLC User's Manual for detailed explanation). Next the Transmit Length (SR370) + and the Receive Length (SR371) are set, and returns to main ladder. + +- SBR --------------+ 32+----------------------------------------------SL=0 +-+ +----------------------+ F000.15 +- LET --------------+ 33+-- +-----------------------------------------D =SR298 TRNSBFR1+- ALWYS_ON S =$0301 Always On LET 34+ D =SR299 TRNSBFR2 S =$0404

+ +

This rung checks a 3-second timeout timer (TC64) to make sure that we have not lost communications after the first message (Query). If the timer times out, the program resets itself to try again automatically, and increments an error counter K1.

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 9

LET 35+ D =SR300 TRNSBFR3 S =$0200 + LET 36+ D =SR301 TRNSBFR4 + S =R0002 LET 37+ D =SR370 TRNS_LEN S =$0008 LET 38+ D =SR371 RECV_LEN S =$0005 +----------------------+ +- RET --------------+ 39+---------------------------------------------- +- + +----------------------+ + Subroutine 1 creates the second message which is the Response Request message. This message is always the same (see N70/700PLUS PLC User's Manual for detailed explanation). Again the Transmit Length (SR370) + and the Receive Length (SR371) are set, and returns to main ladder. +- SBR --------------+ 41+----------------------------------------------SL=1 +- +----------------------+ F000.15 +- LET --------------+ 42+-- +-----------------------------------------D =SR298 TRNSBFR1+- ALWYS_ON S =$0301 Always On LET 43+ D =SR299 TRNSBFR2 S =$0100 + LET 44+ D =SR300 TRNSBFR3 + S =$0000 LET 45+ D =SR370 TRNS_LEN S =$0005 LET 46+ D =SR371 RECV_LEN S =5 +----------------------+ +- RET --------------+ 47+---------------------------------------------- +- + +----------------------+

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 10

+ +- SBR --------------+ 49+----------------------------------------------SL=10 +- +----------------------+ F000.15 +- AND --------------+ 50+-- +-----------------------------------------D =W0010 DEST_ADR+- ALWYS_ON S1=SR334 RECVBFR1 Always S2=$00FF On +----------------------+ F000.15 +---RECVBFR2--+ +---DEST_ADR--+ +---COMM_STP--+ 51+-- +----- SR335 +--- W0010 +--- K0000 +---->>> ALWYS_ON == $0180 == 3 == 0 Always +-------------+ +-------------+ +-------------+ + On +- LET --------------+ 52+ <<<-----------------------------------------D =K0000 COMM_STP+-+ S =1 +----------------------+ M000.0 53+ +-------------------(RST)-- MESSAGE1 First Message F000.15 +---RECVBFR2--+ +---COMM_STP--+ M000.1 54+-- +----- SR335 +--- K0000 +---------------------(RST)-- ALWYS_ON == $0184 == 1 MESSAGE2 Always +-------------+ +-------------+ Second On Message +- LET --------------+ 55+ +-D =K0000 COMM_STP+- S =0 + +----------------------+ +- RET --------------+ 56+---------------------------------------------- +-+ +----------------------+

+ +

Subroutine 10 is called when a message has been received (F11.4). This subroutine checks the first byte of the message for this PLC's address, and then the command code for a valid message. It then increments the step counter (K0) to continue communications.

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 11

Communication mode Binary.(F11.13==1) UD mode (F12.8==1) ASCII(F11.13==0) Byte configure (F11.10,F11.11,F11.12) Start/End code option (F11.2,F11.3) Automatic conversion (F11.8) Byte configure (F11.10,F11.11,F11.12) CRC option(F11.15)

1. ASCII communication When set F11.8 and reset F11.13 (ASCII mode) and ASCII data is 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) <Transmit case> Transmit buffer : 00,01,02,.. (Binary, SR298~SR333) Tx. Length : N (SR370, User write to) Transmit frame : 30,30,31,30,32,30,(Binary) Frame length : N * 2 <Receive case> Receive frame : 30,31,32,33,.. (Binary) Receive length : N Receive buffer : 10,32,.., (Binary, SR334~SR369) Rx. Length : N (SR371,if use the end code option, the CPU write to , The receive buffer size is N/2) When reset F11.8 and reset F11.13 <Transmit case> Transmit buffer : 00,01,02,03, .. (Binary, SR298~SR333) Tx. Length : N (SR370, User write to ) Transmit frame : 30,30,31,30,32,30,33,30,.. (Binary) Frame length : N * 2 <Receive case> Receive frame : 30,31,32,33,34,35, .. (Binary) Receive length : N Receive buffer : 30,31,32,33,34,35,.. (Binary, SR334~SR369) Rx. Length : N (SR371,if use the end code option, the CPU write to ) 2. Binary Communication When set F11.15 and F11.13 (Binary mode) <Transmit case> Transmit buffer : 00,01,02,03, .. (Binary, SR298~SR333) Tx. Length : N (SR370, User write to ) Transmit frame : 00,01,02,03,..,CRC(low),CRC(high) Frame length : N + 2 <Receive case> Receive frame : 00,01,02, .. ,CRC(low),CRC(high) (length = N, except the CRC code byte) Receive length : N (SR371, the user must update the SR371 before receiving sequence) When reset F11.15 and set F11.13 <Transmit case> Transmit buffer : 00,01,02,03, .. (Binary, SR298~SR333) Tx. Length : N (SR370, User write to ) Transmit frame : 00,01,02,03,.. Frame length : N <Receive case> Receive frame : 00,01,02,03 .. (length = N) Receive length : N (SR371, the user must update the SR371 before receiving sequence) - end -

Samsung Electornics Logic and I/O Products SPC-10/N70/N70/700PLUS Series Application Note

#9 - 12

S-ar putea să vă placă și