Skip to main content

Sending TMCC Commands to Legacy Base over Serial Connections

Hello Everyone!

I am in the process of trying to learn how use Lionel's TMCC and Legacy commands to send information to the legacy base via serial connection. Currently I am trying to understand this just for "TMCC1" as Lionel calls it in their publications. I have been reading the Lionel LCS partner Documentation for Legacy Command Protocol and the older manual for TMCC, which has information in the Basic Computer Control chapter (page 36).

I am very good at programming and believe I have the basic knowledge to do this, but I have never really worked with serial communication using bytes directly. I have read on the forum that some people have played with this and got this to work, but there was never really any indication as how it was done. From what I have read in the manuals just for TMCC commands, they use 3 bytes corresponding to a 16-bit word but can really only figure out the first one. This why I am starting this thread. 

I am currently just looking at sending commands to throw switches as required. In the publications it states that the first byte is 0xFE, which indicates that the command being sent to the Legacy base is a "TMCC1" command. Is the next command the switch address (second byte) followed by the command and data field (third byte)?  How do you figure out what to send the base, will it be in the same format as 0xFE or will it be different. I tried doing a conversion from binary to hexadecimal, but don't get the same format. Here is an example of what I am doing for example:

Lets say I want to throw the switch out for switch with a TMCC ID of 27. We know that 8 bits = 1 byte and 16 buts = 2 bytes. Since we need to send three bytes to the base and the first one is 0xFE, we need to determine the next two bytes (16 bits). 

The second byte is needs to be 8 bits, so in binary for a switch an ID of 27 it will be 01 0011011 which comes out to be a hexadecimal of 4D. The third byte would be 10011111 in binary, which would be 9F in hexadecimal. Is this correct or am I missing something? I feel like I am doing something wrong. Also, is when sending the data over serial do you send all three bytes at once or do they have to be sent independently? 

Thanks in advance for the help. 

Chris 

Original Post

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

×
×
×
×
×