Ok, so the inputs are (ignoring the CAN values which could be a possibility for all of them one way or another):
1. thumb switch: analog
2. Auto/Manual switch: digital or analog (for selecting which map to use in auto mode)
3. TPS: analog
4. RPM: timer
5. Brake: analog or digital
6. Handbrake: digital
7. VSS: timer (possibly more than one channel)
8. Accelerometer: analog (possibly more than one channel) or I2C (see below)
The outputs are:
1. DCCD coil: timer, high current grounding
2-8. Lights: digital, medium current grounding
I seem to have counted more inputs and fewer outputs. What am I missing?
The TinyIOx has 6 timer I/Os, 9 ADC inputs, 2 generic digital I/Os and one I2C port; the timer and ADC pins can also be used as generic digital I/Os. I'd rather use the I2C port for the accelerometer since this can be used for 6 axes: 3 accelerometer, 3 gyro. The MPU-6050 is now available in very cheap modules (
http://www.ebay.ca/itm/171065014219) and it makes sense for me to support it as it also optimizes the use of the available I/Os. That module would also give you the yaw data instead of using the factory sensor (but I'd be interested of having more information about that sensor).
So that would mean that the I/Os could:
timers (6): RPM, VSS (up to 4) and DCCD coil
ADCs (4): thumb wheel, switch, TPS, brake
digital (8): handbrake, lights (7)
Counting shows that there's one I/O missing on the TinyIOx. This could be solved by limiting the number of VSS inputs so that if 7 lights are used you only have up to 3 VSS inputs. In other words, one timer pin would be used as either a VSS input or a digital output; all the other pins would have a fixed function. That's assuming that my I/O count is correct.
If there is a need to constrain the duty cycle so that it doesn't go below a certain minimum, that's very much doable with a user-defined threshold (which could well be put at 0 if the user doesn't care about their clutch). And the effect of the handbrake can also be user defined by either simply disabling the output or disabling it for a certain amount of time (again user-defined).
I'll have to check if there is a cheap way of measuring the current to check the coil condition. I also have to see how that would work with a PWM signal although at 100 Hz it's slow enough that it may not be an issue. But that would take up one more ADC input which would mean one fewer VSS input once I shuffle the I/Os around.
Jean