Struggling to get LED output to match what I set

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.
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Struggling to get LED output to match what I set

Post by Addicted »

I'm having a few problems with my shift input patterns and also my LED output patterns.

I'm set up for 4 digital inputs from my gear lever, with "Additional Input Usage" set to "Switch Shift Tables/4th Lever Input" & "Table Switching/4th lever input" set to "Additional Lever Input"

Park LED works. Neutral LED works. First LED works. Park & Neutral displays as -1 in the Manual Gear gauge. (I believe this is correct?)

First correctly displays as 1 in both Manual Gear and Current Gear gauges. Also correct LED pattern

Second displays as second in the Manual Gear gauge. But LED output is incorrectly the same as first

Third incorrectly displays in Manual Gear gauge and LED output is same as first also.

Admittedly I first adjusted the Shift Input Pattern while online, which I realise was a mistake. So I redid it offline, saved a new CAN_1 msq and then reconnected. Have I corrupted something?

I've attached my msq..

I'm using the Tunerstudio v2.6.02

I have checked and double checked the actual input pattern seen by the Megashift.
Attachments
CAN1_July.msq
(45.2 KiB) Downloaded 679 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Struggling to get LED output to match what I set

Post by Bernard Fife »

Addicted,

I will have a look. While I am at it, I will also add an LED status value to the datalog, so that we can see these remotely or after the fact as well.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Struggling to get LED output to match what I set

Post by Addicted »

Ok thanks Lance, tonight I'm going to reflash the GPIO with your latest released code just to ensure that this isn't a corruption issue. I'll report back tomorrow...

I suppose I'm using the LEDs as a check after the fact. I don't know wether the LED is reporting incorrectly or wether the CPU is misinterpreting the 4 digital inputs..i.e its not outputting the correct LED pattern for Reverse because it doesn't think it is IN Reverse..

It would be nice if there was something a user could check (maybe there is) to confirm what gear the CPU thinks it is in...

Thanks Lance!
gui67
Posts: 134
Joined: Tue Oct 05, 2010 11:58 am
Location: Strasbourg, France

Re: Struggling to get LED output to match what I set

Post by gui67 »

Hello Adicted,
In my car, Park and neutral display 0 as Current gear and manual gear.
Reverse is -1. So if your current gear shows -1 while in N or D, there might be a problem.
To know what gear you have on the shift lever, you should check manual gear. And Current gear will give you the gear chosen by MShift.
The led display shows current gear. So if you are stopped, it will show 1 weather you put the lever in 1, 2, 3 or 4. you have to drive and have it shift to see 2, 3...

I looked at your msq, what do you use for the leds: real leds or the 7-segment display? Because I don't understand the logic for the different LED patterns. In my opinion, it should be better to tune with the computer and Tunerstudio, unstead of using the Leds to check the gears.
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Struggling to get LED output to match what I set

Post by Addicted »

Thanks for your input gui67, its appreciated. I use neither LED's or a 7 segment, I use a 8 x 8 LED matrix controlled by an arduino, this way I get P, R & N as well as 1,2,3 and 4
Like you, in Park and Neutral both Current Gear and Manual Gear show 0, in Reverse both show -1

However, I've just flashed my megashift with the most up to date code 4139, just to check if I corrupted something.. but its made no difference.

I've verified my problems:

1) With lever in Reverse,the input pattern is LOW HIGH HIGH HIGH (AD0, AD1, AD3, PE1) I've checked this at the ports.
My LED output for Reverse is set to ON off ON off in Tunerstudio.
However, megashift is actually outputing ON ON off off (I don't have this pattern set for any gear!)

2) With lever in 3, the input pattern is HIGH LOW HIGH LOW, again checked at the ports.
However, tunerstudio is showing Manual Gear as 1

By contrast, with lever in 2, tunerstudio is correctly showing Manual Gear as 2. Also with lever in 1 tunerstudio is correctly showing Manual Gear as 1.
Lever in Park and Neutral also outputs correct LED pattern..

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

Re: Struggling to get LED output to match what I set

Post by Bernard Fife »

Addicted,

When you are checking the LED outputs at the ports, exactly which ports are your checking (for each LED)?

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Struggling to get LED output to match what I set

Post by Addicted »

Lance wrote:Addicted,

When you are checking the LED outputs at the ports, exactly which ports are your checking (for each LED)?

Lance.
For the LEDs I checked at the GPO circuit and the header, but not at CPU.. Mainly because the incorrect pattern doesn't suggest a missing signal if you see what I mean..
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Struggling to get LED output to match what I set

Post by Bernard Fife »

Addicted,

Yes, but exactly which pins on the header are you checking for each of LED1 through LED4?

In any case, I will attach code that should help sort this out. You will need to use the attached INI (the output channel size is different from before). If you could run this and post your MSQ and a datalog of the problem, that would be a be step towards a solution.
Monitor_4144k.abs.s19
Test code
(73.33 KiB) Downloaded 693 times
GPIO_MShift_4144.ini
INI for 4.144k test code
(221.16 KiB) Downloaded 712 times
Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Struggling to get LED output to match what I set

Post by Addicted »

Thanks for that lance, I'll load it up and try it.

Remember though that the LED output works fine in all the other gears, its only reverse that doesn't..

But to be honest my biggest concern is that when I put it in 3 the manual gear shows as 1... :)
gui67
Posts: 134
Joined: Tue Oct 05, 2010 11:58 am
Location: Strasbourg, France

Re: Struggling to get LED output to match what I set

Post by gui67 »

Addicted wrote:Thanks for your input gui67, its appreciated. I use neither LED's or a 7 segment, I use a 8 x 8 LED matrix controlled by an arduino, this way I get P, R & N as well as 1,2,3 and 4
Addicted,
Do you have a picture or a link to the material that is needed to do that?how big is it? Do you need big programming skills to do that?
Guillaume
Post Reply