Microcontrollers and Microsquirt

Forum for discussing how to install MicroSquirt(TM), choose and troubleshoot sensors, wiring, and communications for MicroSquirt (TM) and MicroSquirt Module(TM).
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
Post Reply
latech44
MegaSquirt Newbie
Posts: 2
Joined: Wed Apr 01, 2009 9:52 am

Microcontrollers and Microsquirt

Post by latech44 »

I have a micro controller that has several other peripherals and I would like to know if anyone has ever hooked up the microsquirt to a micro contoller. Since the microsquirt already processes information like TPS, Engine RPM and MAF, all I would need to do is get the outputs of these three things to go into the microcontroller so that it can then be written to an SD card. Any suggestions?? (Because I would hate to have to splice into this wires to only get raw data when it can already be processed for me)

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

Re: Microcontrollers and Microsquirt

Post by grippo »

To get that information from microsquirt to your microcontroller, you would need a CAN interface connection. But microsquirt already datalogs, so the only reason for this would be to get a high speed datalog that would give you outputs for every engine combustion event at all rpms. I don't think a CAN or serial interface would work for that - it would slow down the processor too much. For that you would need to write the data directly from the microsquirt to the SD card - if it had an SD card.

But if you want to use the microcontroller to do other things like turn on fans and shift transmissions, etc, then a CAN link would work fine.
latech44
MegaSquirt Newbie
Posts: 2
Joined: Wed Apr 01, 2009 9:52 am

Re: Microcontrollers and Microsquirt

Post by latech44 »

Well that's the only three things I need to record the other things the microcontroller is logging are GPS, steering angle, acceleration (3 axis) and things like that I didn't want to confuse the excel sheet that I will be putting all the data in by having two seperate files but that may be the only way to do this??
grippo
MegaSquirt Guru
Posts: 921
Joined: Mon Feb 16, 2004 6:55 pm

Re: Microcontrollers and Microsquirt

Post by grippo »

Depending on the data rate you want, this can be done, but you will have to go thru a lot of code to figure out how to get what you want out of the processor. If your data rate requirement is very high and you are driving at high rpm, the MSII may get slowed down. To get just the 3 variables you want, There is a CAN message in the 3.109 code (on microsquirt) that allows you to configure a message such as you want, but this won't work unless you have CAN on your microcontroller. Doing it via serial is easier, but you can only easily get all 112 bytes of output variables per request, and then you throw out all but the 3 you want. This is not a big deal at datalog rates (50 ms between requests), but it is at 1 ms rates.
Post Reply