X10 Community Forum
🔌General Home Automation => Original ActiveHome => Topic started by: halju on January 28, 2010, 06:48:51 PM
-
im currently trying to write a program for a BS2 to control the CM11a. I have the baud rate down, and i understand how to obtain the numbers. My question is what are the numbers Like hex, or decimal? Looking at the com protocol given with cm11a...
0x04,0x66 Address A1
0x6a Checksum ((0x04 + 0x66)&0xff)
0x00 OK for transmission.
0x55 Interface ready.
0x04,0x6e Address A2
0x72 Checksum ((0x04 + 0x6e)&0xff)
0x00 OK for transmission.
0x55 Interface ready.
looking at this i think hex numbers because of the "6e". however its not working for me. here's what my code looks for address A1...
SEROUT 1, 16780, [HEX 04]
SEROUT 1, 16780, [HEX 66]
PAUSE 10
SEROUT 1, 16780, [HEX 00]
PAUSE 10
if any would could clarify this i would appreciate it.
thanks
-
I'm sorry that I don't know Basic Stamp syntax - but those are indeed hexadecimal values.
For communicating with the CM11A or Powerlinc Serial, you need to be able to send binary values out to the serial port.
I do all of my port programming in 'C' where I find it so much easier.
Another tool that I used was a "Serial Port Monitor".
For platforms like Windows and Linux, to name two, you can install software that monitors what is sent and received over the serial port. It makes it easy to see if what you *think* you're sending out the port is indeed what is getting sent.
I just finished up with the Powerlinc interface and will start on my CM11A in a few days.
-
thanks a lot, i figured out the hex question last night. however i didnt realize that they needed to be the binary form. i was sending hex numbers but thank you very much