I'm trying to adapt the template GPIO code to suit my needs (1x EGT, 4X VR vehicle speed and possibly other stuff later).
Working through the code I have met a problem I find myself unable to resolve on my own:
I can't find a map explaining the connections between the PCB's circuits and the CPU's Ports and respective channels. For example, something that says: "VR1 connects to CPU Port [insert port here] Channel [insert channel here]"
Does such a map exist, or have I just been too blind to find it?
Thanks in advance
These all connect through the 25x2 header on the GPIO board, which is labelled with the circuit (on the right) and the processor port/pin (on the left). For example, an adjacent pair might be PA0/VB2 meaning that if you jumper those pins, CPU port AD pin 0 will be connected to circuit VB2, which in turn is connected to Ampseal pin 12.
The CPU has six I/O ports with a total of 25 pins. The ports are AD (analog-digital converters) , T (timer ports), M and S (communications), E and A. In the code and documentation, these are called PAD0x, PTx, PMx, PEx, and PAx, where x is generally a number between 0 and 7. All of these ports can be used as general purpose I/O as well (some with limitations, though).
However, the point of having the 25x2 header is that you can move the circuit to any pin with a jumper, if you need to do this to suit your application.
You can find out much more by studying the schematics here: http://www.msgpio.com/manuals/gpiohw.htm
It isn't necessarily *required* to jumper those circuits, but it is convenient for the specific purposes of the trans controller circuits.
The reason it is done for that application is that PT7 is set-up in the MShift code as an output (spare output 1), so it connects to an otherwise unused output circuit VB1 (the default connection adjacent PT7 is to the VR4 input circuit, which is not needed in the trans application). PAD01 (aka. PAD1 or AD01, etc.), which is adjacent VB1, must then be moved as well, and it is jumpered from VB1 to the otherwise unused GPI2 to act as an input (Input1).
The 25x2 header was specifically designed to allow this sort of flexibility, and you can assign circuits to processor pins however works best for your code.
Sebastian,the assembly guide is designed specifically for the MShift system setup
Not really. What is there was based on some very early MShift docs, but it seems most users have been assembling their own circuits based on the GPIO docs (linked above). There really is no 'standard build' for custom code based on the template code, as users will do different things with different circuits. I will fix the docs up to reflect that.
The best bet for designing and setting up circuits is to follow the links from here: http://www.msgpio.com/manuals/index.htm, especially these:
General Purpose Inputs
General Purpose Outputs
Pulse Width Modulation Outputs
High Current Outputs
I'm quite familiar with the design and adaptation of electric circuits, thank you. (I'm studying electrical engineering at the moment)
I just have been a little confused because the docs were somewhat unclear about what part is "general" and what part belongs to the MShift project.
On the bright side, I have managed to successfully set up and read an EGT sensor with the GPIO board and will now turn to the VR speed sensors.