Page 1 of 2

Struggling to get LED output to match what I set

Posted: Mon Jul 07, 2014 10:45 am
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.

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

Posted: Tue Jul 08, 2014 6:46 am
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.

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

Posted: Tue Jul 08, 2014 7:09 am
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!

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

Posted: Tue Jul 08, 2014 10:01 am
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.

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

Posted: Tue Jul 08, 2014 12:18 pm
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

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

Posted: Tue Jul 08, 2014 2:19 pm
by Bernard Fife
Addicted,

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

Lance.

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

Posted: Tue Jul 08, 2014 10:12 pm
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..

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

Posted: Wed Jul 09, 2014 7:44 am
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 695 times
GPIO_MShift_4144.ini
INI for 4.144k test code
(221.16 KiB) Downloaded 713 times
Lance.

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

Posted: Wed Jul 09, 2014 11:45 am
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... :)

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

Posted: Wed Jul 09, 2014 12:20 pm
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