Help with Spare Ports?

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
Post Reply
Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Help with Spare Ports?

Post by Jim Blackwood »

I'm easily confused, but could use some help sorting out exactly what is meant by Spare Ports.
In the spare port configuration dialog are listed SP: 0 through 5. I need to use them all but am having trouble tracking out exactly what goes where. I need a reference point. I'm having trouble finding which processor ports the Spare Ports designate. Apparently I've misplaced the document that shows that and haven't managed to find it yet. Can someone help with that?

Thanks,
Jim
Thor_patrol
Posts: 13
Joined: Wed Dec 09, 2015 12:28 am

Re: Help with Spare Ports?

Post by Thor_patrol »

Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Re: Help with Spare Ports?

Post by Jim Blackwood »

Thanks, that's a good reference, but doesn't quite get me there. What I really need to know is what each of the Spare Port settings in the software controls.

For instance, Spare Port 0 is the speedometer drive. That tells me that it is on processor pin PT4, uses circuit PWM1 and exits at AMP pin 31. But I only know that it is the speedo drive because that is the default association in the configuration dialog.

What I don't know is what associations to make for Spare Ports 1 through 5. I know what processor ports all of my outputs go to, what circuits, and what pins. I'm just missing the association for the Spare Port designations. I must have had mumps that day.

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

Re: Help with Spare Ports?

Post by Bernard Fife »

Jim,

I am not 100% sure what you are asking.

"Spare port" is a general term we use to mean that an output (and soon some inputs) have functions in addition to their original use. When the output is used for it's original purpose, it is just called by that name. However, when it's function is changed by the user, it becomes a "spare port". A spare port can usually be configured as a shift solenoid output, in which case it becomes OUTPUTx as well as a spare port (ex. spare port 2 becomes OUTPUT4 aka. OUT4 when it is configured as a shift solenoid output).

For example, processor pin PT4 is the speedo output unless the user decides to configure it as a spare port (sp0). If the user chooses to do that, then the user can choose whether to use it as a clutch output, shift solenoid output, or TCC output (with user configurable PWM). Each of the spare ports has these option, plus there original (default) function, and possibly what is called the 'user spare port' (on sp1 and sp2) that lets the user set the conditions in which the port is ON or OFF (as well as the PWM settings). PT4 is normally connected to PWM1 (and Amp31), but the user can swap this on the 25x2 header (and typically would *have* to swap it if the original connection was to an input circuit, such as with spare port 4 and spare port 5).

Originally, spare port 1 and 2 were implemented because these outputs had no assigned functions for the original target 4L60e, so they were made as flexible as possible for users to set when they would be on or off (i.e. "user spare ports"). More functions were added to these spare ports over time (selective clutch, TCC, and shift solenoid). Other spare ports (0, 3, and soon 4 and 5) were added because some users didn't need all of the default assignments, but they need more outputs for their application.

Spare ports 0 through 3 are described here: http://www.msgpio.com/manuals/mshift/spareport.html
Capture.JPG
Capture.JPG (48.33 KiB) Viewed 12306 times
The original functions are in the second and third columns (speedo output and line pressure output), the "spare port functions" are in the last 5 columns.

The web page linked by Thor_patrol also gives the original function as well as the associated spare port[0:3].

Spare ports 4 and 5 are not described in any documentation, since they haven't been implemented in any released code yet (just the code I put up for you to have a look at). The only info on those (at this point) is in your thread in which I posted the code. That will be fixed when the code is released properly. Spare port 4 and 5 will function as TCC (follow the TCC state), selective clutch (you choose the shifts for which they are active), or shift solenoid; with one PWM percentage for the ON state, and another PWM% for the OFF state.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Re: Help with Spare Ports?

Post by Jim Blackwood »

Thanks for the explanation Lance.
I was trying not to be difficult but was confused and trying to figure out which one is which. I still have to study your explanation and I think it will clarify my thinking. There is quite a lot of detail to deal with but I'm struggling through it acceptably well I hope, as long as you guys don't get frustrated with my slow progress.

I'm probably the world's worst Beta tester, it seems like if there's something that can be done backwards I'll find it. I don't know why that is, sometimes maybe I just think about things too much. Not such a problem with mechanical things but with electronics and logic I tend to see too many options I think and sometimes that just doesn't help.

Anyway, thanks again for the help, and I'll be back on it again tomorrow.

Jim
Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Re: Help with Spare Ports?

Post by Jim Blackwood »

OK, I think maybe I have found my point of confusion. In setting the Shift Output Patterns, say for instance output pattern in 1st, I have a list of Outputs, 1 through 11 (4-11 currently greyed out) for which I have to set the on/off state.

I have 8 solenoids that control the gear selected:
Excluding line pressure: PC (PT2) but;
Including TCC/Rev On/Off: SL (PE1), Brake2/TCC: SLU (PT3) and Shift Trigger: SR (PT6).

PT6 is a special case and may have to be dealt with separately from this group, leaving 7 solenoids. These solenoids are as follows:

PT1: PWM4: (SL4) Clutch 4
PT3: PWM2: (SLU) Brake 2/TCC
PT7: VB1: (SL2) Clutch 2
PM2: VB4: (SL3) Clutch 3
PE1: EGT4: (SL) TCC/Reverse On/Off)
PE4: VB3: (SL1) Clutch 1
PAO: VB2: (SL5) Brake 1

Now here is my problem, it has 2 steps:

1) I need to match up the list above with Outputs 1 through 7 in the Output Pattern Dialogs.

2) I need to match the Spare Ports to some of the Outputs 1 through 7 in the Output Pattern Dialogs.

I simply don't know how to do it.
I do not know the relationship between the specific Spare Ports and the matching Outputs and;
I do not know the relationship between the specific Outputs and the other designated output ports. I don't know which ones to match up to what.

Some or all of the answers are probably in the information you guys have directed me to, I just haven't been savvy enough to find it. But I will keep looking. At least now I have the problem properly defined.

Jim
Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Re: Help with Spare Ports?

Post by Jim Blackwood »

So far this is what I have, or think I do anyway, I just hope it is right:

-Output 1: PE4 through VB3, solenoid SL1 operating Clutch 1
-Output 2: PM2 through VB4, solenoid SL3 operating Clutch 3
-Output 3: PT1 through PWM4, solenoid SL4 operating Clutch 4
-Output 4: PAO through VB2, solenoid SL5 operating Brake 1
-Output 5:
-Output 6:
-Output 7: PT7 through VB1, solenoid SL2 operating Clutch 2
-Output 8: PT4 through PWM1 Speedometer drive
-Output 9: PT2 through PWM3, solenoid SLT operating Line pressure
-Output 10:
-Output 11:

Requiring to be assigned to Outputs:
- PT3 through PWM2, solenoid SLU operating Brake 2/TCC
- PT6 through EGT2, solenoid SR operating Shift Trigger
- PE1 through EGT4, solenoid SL operating TCC/Reverse on/off

In the chart, Outputs 5 and 6 are shown as shift lever position inputs, which I think we didn't do. So I still don't know what to do with PT3, PT6 and PE1, all of which are solenoids. Can I just put them on Outputs 5, 6 and 10 in any order I'd like, or is there a pattern to them?

If there is no pattern I would like to put PT6 on Output 10, then PT3 can be Output 5 and PE1 can be Output 6.

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

Re: Help with Spare Ports?

Post by Bernard Fife »

Jim,

These are the assignments:
Capture2.JPG
Capture2.JPG (96.59 KiB) Viewed 12285 times
You may wonder why PAD01 (Output 5) and PAD03 (Output 6) can be used as outputs, when I said in another of your threads that, "PAD04 (line pressure sensor input) can be used as either an analog-to-digital (ATD) input or a digital input. It cannot be used as an output, unfortunately (it is not a general purpose input/output port)." I certainly wondered about that!

It turns out that the freescale docs are contradictory on this point. Some sources say that the pins can be ADC or digital input only, while others say they can be configured as outputs using the data direction register (DDRAD) - it can be used to configure the ADC pins as inputs OR outputs.
Capture3.JPG
Capture3.JPG (79.96 KiB) Viewed 12277 times
This is on page 102 of the document MC9S12C128V1.pdf

I am sure we would have tested output5 and output6 before releasing code with these enabled. However, I will re-test these to make doubly sure.

In assigning the outputs, you have to decide how the PWM works best for you. Some outputs are more flexible than others (single PWM%, 1x12 table or 16x9 table), and some share things like PWM frequencies. So you might have to juggle them around to find the best configuration for your trans.

The code output's numbers (OUTPUTx) are fixed with respect to the pin and spare port. So spare port 4 is*always* on PT6, as is output10. They cannot be moved around (though the output circuit (PWMx, etc.) can be assigned to a given processor pin with a jumper on the 25x2 header).

Processor pin PT3 is the TCC output. It is not a spare port, it has only the TCC function. So you would use it for that (added functionality can be written into the code, of course).

Processor pin PT6 is the default paddle upshift input, and has been assigned for spare port 4/output10 use in 5.202+ code versions (in which case PAD04 becomes the paddle up input).

Processor pin PE1 is the default table switching input, and has been assigned for spare port 5/output11 use in 5.202+ code versions (in which case PE0 become the table switch input).

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Jim Blackwood
Posts: 222
Joined: Tue Dec 07, 2010 9:52 am

Re: Help with Spare Ports?

Post by Jim Blackwood »

Lance,

Definitely getting closer then. My guesses matched the assignments for PT6 and PE1 (I just got lucky) and the rest of the table matches up. The TCC should be the same as the default for the 4L60E, though we have more stuff going on at the software level tied to PE1/Output 11 (Spare Port 5).

PAD01 is the reverse switch input from the shifter and PAD03 is the neutral switch input so I apologize for confusing the issue with outputs there as it appears we don't need them, though it would seem like being able to use them that way could be a potential benefit in some future use. Odd that there would be that ambiguity in the documentation. It looks like the number of Outputs (1-11) matches up to what we need, I think.

All of the solenoids use the same frequency and have very similar characteristics so I'm not going looking for trouble there unless I have to. I hope the assignments we made initially will serve.

I had a note about using PE0 as an auto/manual and/or kickdown button on the shifter, but with paddle shifters and the way you have the code set up for change-over between manual and auto it sounds like that might be redundant. Also one of the factory applications for the AA80E was the Toyota Landcruiser, a 4wd application so I don't think there's much point in worrying about that right now, and hopefully there may never be a need to change it.

I feel like I'm making good progress and will work on finishing up the gear change configurations. I still have some unknowns I'm trying to sort out there.

But I think maybe this finishes up this thread The link to the main thread is here:
viewtopic.php?f=4&t=143&p=5854#p5854

I will post a link to this thread there next time.

Jim
Post Reply