- Mon Jan 27, 2014 3:05 pm
#167770
OK guys, I´ve seen that there is a lot of people out there struggling with this. I´m PIC user, I like it because it´s very cheap where I live. I like it Arduino too. Nonetheless, I wanna run this attached to a PIC.
First of all let´s start understanding the Protocol and how to send it. When I first read I noticed that part that it´s says Multibyte item is represented as Little Endian, according with some research that I did this mean that I have to send the LSB (Least significant Byte) first. Please, correct me if I´m wrong.
Command Packet (Command)
Command Start
0X55----> TYPE: BYTE 1----> Command Start Code1
0XAA----> TYPE: BYTE 2----> Command Start Code1
DEVICE ID (WORD)
0X01----> TYPE: BYTE 3----> Device ID: default is 0x0001, always fixed
0X00----> TYPE: BYTE 4----> Device ID: default is 0x0001, always fixed
PARAMETER (DWORD). In this case is the Parameter Open
0X00----> TYPE: BYTE 5----> PARAMETER
0X00----> TYPE: BYTE 6----> PARAMETER
0X00----> TYPE: BYTE 7----> PARAMETER
0X01----> TYPE: BYTE 8----> PARAMETER
COMMAND (WORD). OPEN
0X01----> TYPE: BYTE 9----> COMMAND OPEN
0X00----> TYPE: BYTE 10----> COMMAND OPEN
CHECKSUM (WORD). BYTE ADDITION, OFFSET 0 +….+ OFFSET 9
0X01----> TYPE: BYTE 11----> COMMAND OPEN
0X01----> TYPE: BYTE 12----> COMMAND OPEN
Guys, please. If I have a mistake, do not hesitate to point it out.
So far, it seems kind of easy. I haven´t try to program it yet. I´ll try this week. However, I do not yet which functions should I use to use with a PIC.
OK, I will be posting my progress. :dance:
First of all let´s start understanding the Protocol and how to send it. When I first read I noticed that part that it´s says Multibyte item is represented as Little Endian, according with some research that I did this mean that I have to send the LSB (Least significant Byte) first. Please, correct me if I´m wrong.
Command Packet (Command)
Command Start
0X55----> TYPE: BYTE 1----> Command Start Code1
0XAA----> TYPE: BYTE 2----> Command Start Code1
DEVICE ID (WORD)
0X01----> TYPE: BYTE 3----> Device ID: default is 0x0001, always fixed
0X00----> TYPE: BYTE 4----> Device ID: default is 0x0001, always fixed
PARAMETER (DWORD). In this case is the Parameter Open
0X00----> TYPE: BYTE 5----> PARAMETER
0X00----> TYPE: BYTE 6----> PARAMETER
0X00----> TYPE: BYTE 7----> PARAMETER
0X01----> TYPE: BYTE 8----> PARAMETER
COMMAND (WORD). OPEN
0X01----> TYPE: BYTE 9----> COMMAND OPEN
0X00----> TYPE: BYTE 10----> COMMAND OPEN
CHECKSUM (WORD). BYTE ADDITION, OFFSET 0 +….+ OFFSET 9
0X01----> TYPE: BYTE 11----> COMMAND OPEN
0X01----> TYPE: BYTE 12----> COMMAND OPEN
Guys, please. If I have a mistake, do not hesitate to point it out.
So far, it seems kind of easy. I haven´t try to program it yet. I´ll try this week. However, I do not yet which functions should I use to use with a PIC.
OK, I will be posting my progress. :dance:
Everything that has begining... has an end