Page 1 of 1

Microcontrollers and Microsquirt

Posted: Wed Apr 01, 2009 9:57 am
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

Re: Microcontrollers and Microsquirt

Posted: Thu Apr 02, 2009 4:13 am
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.

Re: Microcontrollers and Microsquirt

Posted: Thu Apr 02, 2009 10:51 am
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??

Re: Microcontrollers and Microsquirt

Posted: Thu Apr 02, 2009 12:49 pm
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.