PC and projector serial communication-SM7-405 UV Projector Communication Protocol

PC and projector serial communication-SM7-405 UV Projector Communication Protocol

Brief introduction This document is mainly to introduce projector and PC serial communication instruction, for users to complete the serial communication of SM7 UV projector.

1 Copyright statement Without written permission of the company, any entity or individual shall not extract or copy part or the whole content of the document, and shall not transmit it in any way.

2 Document introduction This document is mainly to introduce projector and PC serial communication instruction, for users to complete the serial communication of projector.

3 Document purpose Guide users to complete the operation of projector platform serial communication

4 Document scope This document is mainly to introduce projector and PC serial communication instruction, for users to complete the serial communication of projector.

5 Object reader Projector serial communication users, or technical engineer 6 Projector serial communication

6.1 Projector interface specifications Projector realizes data communication with PC through specialized VGA interface(including tx,rx,gnd),completes corresponding operation according to the Cmd of PC. The data frame of serial communication is 1 start, 8 data, 1 stop, no parity checking, baud rate 9600.In serial communication, the lowest valid byte will be transmitted firstly.

6.2    4 Communication process must be through PC sending Cmd and data to projector, and then the projector returning the Cmd execution result state and data to PC. Cmd sending process is as follows

Cmd and data which are sent from PC to projector must be comply with the format and specifications of this protocol.After sending Cmd and data to projector, and then waiting for the execution results When projector receives Cmd from PC, executes the corresponding Cmd and then returns results. Cmd execution is as follows, Projector Data transfer direction PC Description Response data block → Projector executes Cmd, receives the result, and then sends response data block to PC, which is obtained from the execution of corresponding Cmd. So far, a complete communication process comes to the end.

6.3 Data block format

6.3.1 PC and projector communication format Sending frame format, Start Length MainCmd SubCmd Data CheckSum 0xE0 0x05+N(Data length) Occupying 1 byte Occupying 1 byte N byte Occupying 1 byte Start:Occupying 1 byte, fixed to be 0xE0, unchangeable. Length:Occupying 1byte, which means total length of current communication one frame data. Total length is 5+N (Start、Length、MainCmd、SubCmd、CheckSum add up to 5 bytes,Data is N byte.) MainCmd:Occupying 1 byte, being MainCmd. SubCmd:Occupying 1byte, being subcmd. SM7-405 Serial Communication Protocol SICUBE PHOTONICS CO., LIMITED       www.si‐cube.com      info@si‐cube.com                                                      

 5 CheckSum: Checksum. Computing method of Checksum: Besides Checksum, all data add up for complement, namely the complementation plus 1, take the low type. Note: Frame data does not include any punctuation. Receiving frame format, Length Data CheckSum N+1 N byte Occupying 1 byte 6.3.2 PC and projector communication specific Cmd When MainCmd equals 0x41, corresponding SubCmd will be totally 3 as following, SubCmd Value Description Get current 0x01 This Cmd is to get RGB current.When projector receives the Cmd, sends PC 6 bytes.The corresponding current of R,G,B are 2 bytes, low byte first. Set current 0x02 This Cmd is to set RGB current. When PC send this Cmd to projector, the projector receives 6 bytes RGB current and set it, low byte first. After executing the Cmd, the projector returns to “Ack” LED ONOFF control 0x18 This Cmd is to control LED ONOFF.After executing the Cmd, the projector returns to “Ack”

6.3.3 PC and projector handshake Cmd State Length MainCmd SubCmd CheckSum 0xE0 0x05 0x44 0x00 0Xd7 PC sends Cmd 5bytes(0xE0,0x05,0x44,0x00,0Xd7)to projector. After receiving the Cmd, the projector sends a string “shakehands”to the PC, not including “”. If PC receives the string, means handshake is successful, or else, it’s failed. Returning data frame:0C 53 68 61 6B 65 48 61 6E 64 73 1A Note: Handshake Cmd is used to test whether the serial communication line between PC and computer is normal or not, it only need to be sent once after opening the serial port. 

  6 6.3.4 MainCmd equals 0x41, corresponding SubCmd (no checksum) 1、 Get current Cmd 0x01 State Length MainCmd SubCmd 0xE0 0x04 0x41 0x01 PC sends Cmd 4Bytes(0xE0,0x04,0x41,0x01)to projector, and the projector sends 6bytes RGB current value to PC after receiving the Cmd,low byte first. Corresponding format:R_Low,R_High,G_Low,G_High,B_Low,B_High For example:R=100,G=100,B=100, Corresponding return data: 0x64,00,0x64,00,0x64,0x00 2、 Set current Cmd 0x02 Start Length MainCmd SubCmd Data 0xE0 0x0A 0x41 0x02 xx ,xx, xx ,xx, xx, xx PC sends Cmd 10bytes(0xE0,0x0A,0x41,0x02, xx, xx, xx ,xx, xx, xx)to projector, after receiving the Cmd, the projector set the corresponding RGB current and return the string “Ack”, not including “”. RGB current which need to be set is corresponding to Data. Corresponding data format of Data: R_Low,R_High,G_Low,G_High,B_Low,B_High For example:R=100,G=100,B=100,corresponding data:0x64,00,0x64,00,0x64,0x00 A complete frame data: 0xE0,0x0A,0x41,0x02, 0x64,00,0x64,00,0x64,0x00 Note:R=0~255,G=0~255,B=0~255 3、 LED ONOFF control Cmd 0x18 Start Length MainCmd SubCmd Data 0xE0 0x05 0x41 0x18 xx PC sends Cmd 5bytes(0xE0,0x05,0x41,0x18, xx)to projector,after receiving the Cmd, the projector set corresponding LED state and return the string “Ack”, not including “”. LED state value which need to be set is corresponding to Data. LED ON Cmd:0xE0,0x05,0x41,0x18,0x01 R e t u r n : 0x41,0x63,0x6B , namely Ack LED OFF Cmd:0xE0,0x05,0x41,0x18,0x00 R e t u r n : 0x41,0x63,0x6B , Namely Ack 6.4 Projector firmware upgrade(no checksum)                                     

  7 Copy projector firmware document (document name and type being unchangeable)to root directory of U disk, and then insert the Udisk to USB interface of the projector, send upgrade Cmd through serial port. After upgrading, the projector will automatically restart.

Back to blog

Leave a comment