Info from char "a"

For engine experimenters, the MicroSquirt® PCB is offered in a module format with enhanced capabilities to be plugged into other boards. This is the place to discuss the MicroSquirt Module.
Post Reply
larry_s
MegaSquirt Newbie
Posts: 1
Joined: Mon Sep 13, 2010 6:41 pm

Info from char "a"

Post by larry_s »

What I am trying to do is obtain information from microsquirt about the engine speed so it can be sent to the rs232. From searching the code in main v2.891.c (about line 7003), it says that if the character “a” is sent, all of the engine data is returned. From examining data already captured, after the “a” character is sent, it is followed by a null, then there is an acknowledgement followed by another null. Where can I expect to see the rpm data? Also, is this data little endian or big endian? How can I calculate the engine speed from this, and how many bits of data represents an unsigned integer? I'd appreciate any help.

Thanks,
Larry
grippo
MegaSquirt Guru
Posts: 921
Joined: Mon Feb 16, 2004 6:55 pm

Re: Info from char "a"

Post by grippo »

The data come over as binary data, not ascii, so it shows up as unprintable characters on a terminal program like hyperterm. To test your setup, just give it a 'Q' command (uppercase Q) in hyperterm. You should see a string, MSII + version number come back in ascii. TS has a mini-terminal that you can set to ascii or decimal, and that may give you what you want. The rpm is in decimal and you can read rpm directly. You can find the breakdown of variables by looking at the ini file - it lists each variable and its type and byte offset.
Post Reply