Configurable polarity of I/O
Posted: Thu Aug 07, 2008 12:08 pm
Hi, ca7 brought up an interesting point in another thread that I hadn't considered at all until now.
I/O polarity.
I suspect that we should be paying close attention to these threads while discussing this :
http://www.diyefi.org/forum/viewtopic.php?f=9&t=135
http://www.diyefi.org/forum/viewtopic.php?f=8&t=134
For input I can see some reasons for handling it, BUT, it IS a minor pain in the arse to handle AND it slows the code down. So, if we can make it something to be done in hardware, that *might* make sense, or for input it might not.
For ignition output I had been thinking about how to implement it super efficiently and failed to think of a nice way. It would be VERY nice for the code if we didn't do that at all. Further as illustrated in the other thread having the hardware setup not matching the software brings dire consequences. If the software is fixed, the hardware will be forced to be correct from the start or it simply will not work. Additionally (and I fully had not realised the implications of what I was saying) if we are to have a situation where during bootloader it isn't possible to burn stuff out, then either the wiring setup I've suggested would need to be adhered to and/or we need to fix the way the outputs work up front and not allow selection.
I can't see much of a problem with the ignition outs being fixed polarity as if you are driving coils directly then it will just be correct, and if you are driving them through external ignitors then you can easily insert a transistor to invert the signal.
On the input side for RPM I'm wondering if I could remove some code and speed and clean things up if we allowed configurable polarity in hardware by default. Just have a jumper for each input that selects inverted or not.
I know I always tend to this standardised inflexible way of doing things, but the general reason is a good one (standardisation of installs) and in this case I believe we have a very valid reason to not allow configurability.
Thoughts anyone? ca7, do you have anything to add/disagree with/agree with on this? Thanks for your post btw, most appreciated!
Fred.
I/O polarity.
I suspect that we should be paying close attention to these threads while discussing this :
http://www.diyefi.org/forum/viewtopic.php?f=9&t=135
http://www.diyefi.org/forum/viewtopic.php?f=8&t=134
For input I can see some reasons for handling it, BUT, it IS a minor pain in the arse to handle AND it slows the code down. So, if we can make it something to be done in hardware, that *might* make sense, or for input it might not.
For ignition output I had been thinking about how to implement it super efficiently and failed to think of a nice way. It would be VERY nice for the code if we didn't do that at all. Further as illustrated in the other thread having the hardware setup not matching the software brings dire consequences. If the software is fixed, the hardware will be forced to be correct from the start or it simply will not work. Additionally (and I fully had not realised the implications of what I was saying) if we are to have a situation where during bootloader it isn't possible to burn stuff out, then either the wiring setup I've suggested would need to be adhered to and/or we need to fix the way the outputs work up front and not allow selection.
I can't see much of a problem with the ignition outs being fixed polarity as if you are driving coils directly then it will just be correct, and if you are driving them through external ignitors then you can easily insert a transistor to invert the signal.
On the input side for RPM I'm wondering if I could remove some code and speed and clean things up if we allowed configurable polarity in hardware by default. Just have a jumper for each input that selects inverted or not.
I know I always tend to this standardised inflexible way of doing things, but the general reason is a good one (standardisation of installs) and in this case I believe we have a very valid reason to not allow configurability.
Thoughts anyone? ca7, do you have anything to add/disagree with/agree with on this? Thanks for your post btw, most appreciated!
Fred.