[Diy_efi] Re: Microcontrollers For use on DIY_EFI Systems

Tomas Sokorai Sch. tsokorai at xperts.cl
Wed Jul 17 16:38:27 GMT 2002


On Wednesday 17 July 2002 11:45, Kenny W wrote:

> I'm pretty sure idivide on an Hc11 takes 32 cycles,
> it's ugly. If you use your own routines you can do it
> in less SOMETIMES, but you're a little bit at the mercy
> what 2 numbers you are working with which is not fun if
> there's any timing involved since you can't predict how
> long it will take.

wow, ONLY 32 cycles!!!, ;) 
take a look at these numbers for the 16x PIC family:
8x8bits unsigned multiply: 74 cycles (average)
16x16bits unsigned multiply: 214 cycles (average)
8x8bits unsigned divide:102 cycles (average)
16x16bits unsigned divide:371 cycles (average)

All this values are from Microchip's math library documentation

I'm not saying the PICs 16 family is bad, but is not oriented where you need a 
lot of multiplications and/or divisions in real time.
normally the fuel pulsewidth has to be calculated multiplying values from 
tables, so for a fuel ECU, is unsuitable.
The excellent I/O capabilities make these PICs GREAT for "sensor servers", for 
example to have a pic reading the sensors and for example linearizing the 
values with a lookup table and then the fuel ECU can get a value ready for 
use from the PIC. You can even group sensors with one PIC and ask the "sensor 
server" to hand the result from a certain sensor to the ECU

> Seems like tons and tons of hard coded lookup tables
> are about the only option if you go the route of such

Yup, hardcoded tables is the only approach, but for simple tasks. I guess the 
tables to efficently build a fuel ECU will take a LOT more than the 8k words 
the 16F877 has.
I'm trying to build a digital ignition with a 16F873 and using the "only 
tables" approach for deriving advance from RPM and MAP , but only for dark 
masochistic reasons ;)


Tomas 


_______________________________________________
Diy_efi mailing list
Diy_efi at diy-efi.org
http://www.diy-efi.org/mailman/listinfo/diy_efi



More information about the Diy_efi mailing list