- Thu Jul 02, 2020 7:00 am
#44019
So I have a few extra uC's , black board, bluepills, mega 2560 and mega 2560 pro's, now a couple teensy 3.5's with tall dog breakout boards. I'm thinking about building a modular ecu with a seperate input and output boards (I etch boards at home). I like the teensy, and judging by the discussion on Josh's Saturday live chat, the teensy is the direction things are headed right now, but as has been stated on this board before by pazi88;
"Just be aware that you will quicly run out of pins with teensy"
I have need for 8x8 sequentiall, along with 8 more staged injectors. So thats already 24 pins (or 17 if the staged injectors are paired to the primaries and just get all their drivers enabled/disabled with 1 output pin).
So why not just drive these 24 (or 17) channels from an external shift register as 3 Bytes of data. It should only take 3 output pins to send it serially. With 100+Mhz processors surely sending 24 bits of data serially wouldn't be a performance issue would it? I was thinking this would also be an easy way to send a 5V signal to the injector drivers by just using one one 3.3 to 5v level shifter between the 5v shift register chip(s) and the Teensy. With the shift register operating at 5v I would think you might be able to use the vnld5090 dual igbt's, which apparently dont work well on 3.3v.
Anyhow, just something I was pondering today, I havent looked at the code yet to see if this would be simple or hard to redirect the injector and ignition bits to a serial output rather than individual pins.
I'm not a great coder at all, and last time I wrote any code to send data serially was 20 years ago on a pic using pbasic to draw a bargraph on a hd44780 2x20 character display. But I know that even on a really slow uC you can bit bang small chunks of data reasonably quick.
"Just be aware that you will quicly run out of pins with teensy"
I have need for 8x8 sequentiall, along with 8 more staged injectors. So thats already 24 pins (or 17 if the staged injectors are paired to the primaries and just get all their drivers enabled/disabled with 1 output pin).
So why not just drive these 24 (or 17) channels from an external shift register as 3 Bytes of data. It should only take 3 output pins to send it serially. With 100+Mhz processors surely sending 24 bits of data serially wouldn't be a performance issue would it? I was thinking this would also be an easy way to send a 5V signal to the injector drivers by just using one one 3.3 to 5v level shifter between the 5v shift register chip(s) and the Teensy. With the shift register operating at 5v I would think you might be able to use the vnld5090 dual igbt's, which apparently dont work well on 3.3v.
Anyhow, just something I was pondering today, I havent looked at the code yet to see if this would be simple or hard to redirect the injector and ignition bits to a serial output rather than individual pins.
I'm not a great coder at all, and last time I wrote any code to send data serially was 20 years ago on a pic using pbasic to draw a bargraph on a hd44780 2x20 character display. But I know that even on a really slow uC you can bit bang small chunks of data reasonably quick.