Serial communications with MS II

A forum for discussing the creation, modification, and loading of embedded code for B&G MS-I/MS-II.
Forum rules
Read the manual to see if your question is answered there before posting. Many users will not reply if the answer is already available in the manual.

If your question is about troubleshooting, configuration, or tuning, you MUST include your processor type (MS-I or MS-II) and code version in your post. If your question is about PCB assembly or modifications, you must also include the main board version number (1.01, 2.2 or 3.0).

If you have questions about MS1/Extra or MS2/Extra code configuration or tuning, please post them at www.msextra.com Such questions posted here will be moved to: a temporary MSextra sub-forum, where they will be removed after 7 days

The full forum rules are here: Forum Rules, be sure to read them all regularly.
Post Reply
GunPilot64
MegaSquirt Newbie
Posts: 2
Joined: Sun Apr 11, 2004 6:35 pm
Location: Arizona
Contact:

Serial communications with MS II

Post 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
grippo
Site Admin
Posts: 286
Joined: Mon Feb 16, 2004 6:55 pm

Re: Serial communications with MS II

Post 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.
GunPilot64
MegaSquirt Newbie
Posts: 2
Joined: Sun Apr 11, 2004 6:35 pm
Location: Arizona
Contact:

Re: Serial communications with MS II

Post 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
GrahamB
MegaSquirt Newbie
Posts: 6
Joined: Wed Oct 20, 2010 12:25 pm

Re: Serial communications with MS II

Post 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?
Post Reply