Page 1 of 1

Serial communications with MS II

Posted: Tue Dec 07, 2010 9:46 pm
by GunPilot64
I am trying to communicate serially with my MSII. Code is 2.891. I have read the Megamanual MSII coding page, and I'm using the 'a 0 6' serial sequence to try to get data back but so far no luck. The "Q" and "S" commands work fine and the MS communicates with Megatune properly so I know it's on my end.

My question is, was there some change in the 2.891 code that changed the protocol? Is there something I don't know about sending 'a 0 6' to the serial port? I am using a delay of 100 ms between characters. I am sending ASCII 'a' and binary 0 and 6. So... don't know what else to look for. I've googled it and it looks like everyone but me can talk to the MS II. Any insight appreciated - Matt?

Thanks a lot -

George

Re: Serial communications with MS II

Posted: Wed Dec 08, 2010 4:27 pm
by grippo
No change in protocol - that sequence should work. I would try it with TS mini terminal. You can turn on the log function and it will tell you what is going back and forth.

Re: Serial communications with MS II

Posted: Wed Dec 08, 2010 10:33 pm
by GunPilot64
Hmm... using the mini terminal I find that I have to send three or four sets of 'a' + ASCII 13, and then I get the data string. No variation of a06 or just pressing 'a' will do. Well, at least I know now how to get it - just send 'a' plus CRLF. Weird though. Thanks for the hint to use the mini terminal - although I had tried things like puTTY, it did the trick.

-G

Re: Serial communications with MS II

Posted: Fri Feb 11, 2011 2:45 am
by GrahamB
Has anyone experimented with the loop mode in the 68HCS12?
In principle, if you set bit 5 in SCICR1, and enable both the rx and tx bits (2 & 3) in SCICR2,
the chip should simply return any message it receives exactly as though you had bridged the corresponding pins
on the socket... but maybe it also requires the baud rate to be set correctly?

My microsquirt communicates perfectly in bootloader mode, so the hardware is obviously good, but is deaf
when in run mode, even after setting loop as a sanity check. So obviously I've done something wrong
at a fairly basic level. I have the baud rate register setting itself to 0x0D (seems correct to me,
16 x 13 x 115200= 23.9616MHz).

Ideas?