GPIO CPU Pinout

A forum for discussing the applications and implementations of the DIY general code template for the GPIO and its 25 user inputs and outputs (+ serial & CAN). The code is 99% complete, the user just has to add their own conditional I/O logic and compile (with a free special Edition of CodeWarrior).
Post Reply
SebastianS
Posts: 16
Joined: Fri Apr 26, 2013 1:30 am

GPIO CPU Pinout

Post by SebastianS » Sat May 04, 2013 3:37 am

Hi everyone,

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? :D

Thanks in advance
Sebastian

Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: GPIO CPU Pinout

Post by Bernard Fife » Sat May 04, 2013 5:32 am

Sebastian,

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

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw

SebastianS
Posts: 16
Joined: Fri Apr 26, 2013 1:30 am

Re: GPIO CPU Pinout

Post by SebastianS » Sat May 04, 2013 6:14 am

Thank you, that helped a lot.

But that gives me another question regarding that pin header: in the assembly guide (http://www.msgpio.com/manuals/assemble.htm) it is required to jumper PT7 to VB1 and AD1 to GPI2. What is the purpose of these jumpers?

Sebastian

Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: GPIO CPU Pinout

Post by Bernard Fife » Sat May 04, 2013 7:32 am

Sebastian,

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.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw

SebastianS
Posts: 16
Joined: Fri Apr 26, 2013 1:30 am

Re: GPIO CPU Pinout

Post by SebastianS » Sat May 04, 2013 7:46 am

Aha, so the assembly guide is designed specifically for the MShift system setup?
Maybe then you should make that a little more obvious in the guide itself.

-Sebastian

Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: GPIO CPU Pinout

Post by Bernard Fife » Sat May 04, 2013 12:02 pm

the assembly guide is designed specifically for the MShift system setup
Sebastian,

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
VR Inputs
EGT Inputs

General Purpose Outputs
Pulse Width Modulation Outputs
High Current Outputs

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw

SebastianS
Posts: 16
Joined: Fri Apr 26, 2013 1:30 am

Re: GPIO CPU Pinout

Post by SebastianS » Sun May 05, 2013 10:52 am

Lance,

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.

-Sebastian

Post Reply