AA80E 8-speed
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
Jim
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: AA80E 8-speed
You might have to combine some included file into the main.c file in order to get under the special edition file number limit as well. I.e. where it says something like:
Code: Select all
#include "ports_pins.h"
Code: Select all
// This header defines all the I/O port assignments so that
// the main.c, etc. are clear of direct hardware references.
/** I/O Port Quick_Start ******************************************
--------------------
Function Port I/O ON OFF READ NOTES
-------- ---- --- -- --- ---- -----
Brake Sense PAD07 I -- -- (PORTAD0 & 0x80) - on/off
Paddle DOWN PAD06 I -- -- (PORTAD0 & 0x40) - on/off
non-CAN MAP/TPS/MAF PAD05 I -- -- ATD0DR5 - ADC count
line pressure sensor PAD04 I -- -- ATD0DR4 - ADC count
Input3 PAD03 I -- -- ATD0DR3 - ADC count
Temp Sensor PAD02 I -- -- ATD0DR2 - ADC count
Input2 PAD01 I -- -- ATD0DR1 - ADC count
Input1 PAD00 I -- -- ATD0DR0 - ADC count
Spare Output1 PT7 O spr1(1); *pPTTpin[7] &= ~0x80; ---
Paddle UP PT6 I -- -- PTT & 0x40 - on/off
ISS PT5 I Interrupt ISS_timer() - interrupt called on edge
Speedo Output PT4 O PWMDTY4 = 0; PWMDTY4 = PWMPER4; PWMDTY4
TCC PT3 O PWMDTY3 = 0; PWMDTY3 = PWMPER3; PWMDTY3
PC PT2 O PWMDTY2 = 0; PWMDTY2 = PWMPER2; PWMDTY2
Output3 PT1 O PWMDTY1 = 0; PWMDTY1 = PWMPER1; PWMDTY1
VSS PT0 I Interrupt VSS_timer() - interrupt called on edge
LED4 PB4 O PORTB |= 0x10; PORTB &= ~0x10; ---
LED3 PM5 O *pPTMpin[5] |= 0x20; *pPTMpin[5] &= ~0x20; ---
LED1 PM4 O *pPTMpin[4] |= 0x10; *pPTMpin[4] &= ~0x10; ---
LED2 PM3 O *pPTMpin[3] |= 0x08; *pPTMpin[3] &= ~0x08; ---
Output2 PM2 O *pPTMpin[2] |= 0x04; *pPTMpin[2] &= ~0x04; ---
Output1 PE4 O PORTE |= 0x10; PORTE &= ~0x10; ---
4WD input PE1 I -- -- (PORTE & 0x02) - on/off
Spare Output2 PA0 O PORTA |= 0x01; PORTA &= ~0x01; ---
*/
// ----------------- INPUTS ------------------------------------
// -------------------------------------------------------------
// switchA
#define SWITCHA_ADC 0
// switchB
#define SWITCHB_ADC 1
// temperature
#define TEMPER_ADC 2
// switchC
#define SWITCHC_ADC 3
// line pressure
#define PRESSURE_ADC 4
// non-CAN MAP/TPS/MAF
#define NC_LOAD_ADC 5
// Voltage based shift buttons
#define VOLT_SHIFT_ADC 6
// Brake
#define BRAKE_ADC 7
// Paddle Down PAD06
#define PADDLE_DOWN PORTAD0
#define PADDLE_DOWNpin 0x40
// Paddle Up PT6
#define PADDLE_UP PTT
#define PADDLE_UPpin 0x40
// Brakes PAD07
#define BRAKE PORTAD0
#define BRAKEpin 0x80
// 4WD
#define FOUR_WD PORTE
#define FOUR_WDpin 0x02
// ------------------------ OUTPUTS ----------------------------
// -------------------------------------------------------------
// Output1
#define OUTPUT1port PORTE
#define OUTPUT1pin 0x10
// Output2
#define OUTPUT2port *pPTMpin[2]
#define OUTPUT2pin 0x04
// Output3
#define OUTPUT3pwm PWMDTY1
#define OUTPUT3_ON PWMPER1
#define OUTPUT3_OFF 0
// Output4
#define OUTPUT4port PORTA
#define OUTPUT4pin 0x01
...
...
...
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
That sounds like about a 20% reduction is what it will take, but like you say it can be tailored specifically for this tranny so hopefully it is possible.
Jim
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
Jim
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: AA80E 8-speed
Also, the user can (and I have) re-"defined" the ports to make the code easier to read. So in the ports_pin.h file are things like:
Code: Select all
// Output1
#define OUTPUT1port PORTE
#define OUTPUT1pin 0x10
Code: Select all
OUTPUT1port |= OUTPUT1pin; // set PE4 high
Code: Select all
PORTE |= 0x10; // set PE4 high
Code: Select all
PORTE = PORTE | 0x10; // set PE4 high
That is, if a bit in 0x10 OR PORTE is high (1) then set the corresponding bit in PORTE to 1.
To shut the pin off, we use:
Code: Select all
OUTPUT1port &= ~OUTPUT1pin; // set PE4 high
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
If we settle on the changes we think will work would you be willing to compile it if I send you the altered files?
Jim
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: AA80E 8-speed
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
As I said, I'm no code jockey and trying to learn as I go. Matt is studying this stuff at NKU and is just this week doing exactly what you are describing with his compiler, though currently working with assembly language. I'm almost amazed they still teach it, but you know academics.
Anyway he's said he'll have time over the Christmas break to work on it with me, really doesn't want to deal with it right now. So while I wait I'm looking for all instances of AD4 and PT6 in the various files. It'd be great if I could find a way to just highlight those instances without changing anything, I don't know if that is possible. If so I'd like to identify them all first and maybe try to understand what they do before changing anything.
That's my plan for now anyway. I'm hoping Matt can error check my work well enough to get it to compile. Along the way if I can figure out how to strip lines without crippling the code or otherwise screwing it up, then we'll see if it'll compile here before I ask you to do it on the full version, that way maybe we can reduce the burden if we reach that point. I agree with you that if a trimmed down version will run there's really no need to compile the full version, but I'll leave that up to you.
As Matt explained it to me, I'll need to find all instances of AD4 and change them to PT6, find all instances of PT6 and change them to AD4, not get the two mixed up (I'm thinking a 2 stage process with an intermediate identifier like "???" or something not otherwise used in the code), and then we may have to look at what is required to output a single pulse on PT6.
Interestingly, Ben Newell in the UK has characterized the shift trigger as a PWM signal, and it is certainly the case that the solenoid itself is a PWM capable solenoid. But that does not mean it isn't capable of acting like a non-PWM solenoid as well. I can't imagine at this point why you'd need to modulate the flow of the shift trigger, but it may turn out that this is also a means of controlling shift firmness. So perhaps the trigger pulse is best sent as a series of PWM pulses to make up the trigger pulse. It could be easier that way anyhow with the existing GUI and also allow modulation of the trigger pulse itself. (Ben has developed a controller based on two microsquirt modules, but does not feel his code is applicable to the GPIO. I've not heard from him in a couple of weeks, hope I didn't do anything to sour the relationship, but I suspect he's concluded I'm not a potential customer.)
Anyway, that's where matters now stand. I'll keep plugging away at it. I still may find a chance at some point to try triggering a shift with an external switch, but If I do I'll have to get the energized signal off of paddle upshift first, as I'm sure that is interfering with the shift logic. I'd really rather get that done in software as it has to be switched there anyway at some point if there is any hope of close to normal operation.
Jim
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: AA80E 8-speed
-
- Posts: 222
- Joined: Tue Dec 07, 2010 9:52 am
Re: AA80E 8-speed
Further consideration of the required output for PT6 (shift trigger) has led me to suspect that use of a PWM signal to the solenoid is likely to be preferred. My reasoning is that because the transmission valve body goes into limp mode if the signal stays high or low, hydraulically this means limp occurs if the solenoid valve remains closed or fully open. In other words, either full or zero pressure in the circuit. Logic would dictate that the valve must either remain partially open (modulated flow) or change state often enough to keep an accumulator partially charged but not fully pressurized. (There are no accumulators in the valve body that I am aware of or that appeared during visual inspection, and one of the design goals was to eliminate them.) PWM operation is therefore indicated, and the solenoid is indeed a PWM type.
The question is the required opening of the solenoid under shifting and non-shifting conditions. My guess is that a full or nearly full open state is used to initiate a shift and a minimally open state is used otherwise. Likely some experimentation will be required, but initially we could try making it open fully at the same time that the other shift solenoids change state and see how that works. Then perhaps play with tapering off the signal until it goes into limp mode again to determine the minimum signal level. Next after that would be to shorten the transition or taper to allow rapid sequential shifts. This might best be done in TS with a 2 axis line graph such as used for IAC tuning with % open on the vertical axis and a time base of maybe half a second or more on the horizontal, referencing zero to the instant when the other shifting solenoids change state. I wouldn't think there would be any reason to actuate before the zero point. A time base of several seconds to a minute or more would be useful in establishing the minimum open setting but after that would be an impediment.
I hope to finish with the book during the next month, and be working on the changes during that time. Obviously any suggestions from you will be much appreciated. I will continue in the meantime to post comments as seems helpful.
Jim