Skip to main content

Reply to "Sending TMCC Commands to Legacy Base over Serial Connections"

Hi Chris - 

Your math is correct, though in your post your second byte is 9 bits long. Remember, the TMCC addresses don't align on the byte boundaries.  But 4D 9F is correct for setting switch 27 to through.

To send that command to the Base you would just transmit FE 4D 9F. I'm not clear on what you mean by sending bytes together or independently.... Depending on what kind of hardware you are using, you would usually just dump those three bytes into a serial buffer, and the hardware would take care of sending them out at 9600 baud. What hardware are you using to talk to the base?

Here is a code fragment of how to assemble the two TMCC command bytes:

 TMCCCommand1 = deviceType | (deviceID >> 1); // Byte 2 is combination of type field and first 7 bit of TMCC address
TMCCCommand2 = (deviceID << 7) | (commandField << 5) | dataField; // Byte 3 is last bit of TMCC address, command field (2 bits), plus data field
where these are the deviceTypes:
 ENGType = B00000000
SWType = B01000000
TRType = B11001000
Last edited by Professor Chaos

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×