Latest Code Updates

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.
Locked
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put the latest v2.200 release code on the full release page here: http://www.msgpio.com/manuals/mshift/V2code.html

This code is identical to the 2.131 beta code, *except*:
- the version number was change from 2.131 to 2.200 (of course), and
- the default value for rpm checking was changed to 'enabled' from 'disabled'.

Except for bug fixes, this is the 'end of the line' for V2 code.

The help file for V2.2xx code is here: http://www.msgpio.com/manuals/mshift/V22tune.html

In a few days, I will be releasing the first of the 4.1xx series of beta codes. The initial version will add a PWM spare port output (spare port 0, aka. "sp0") on the speedometer output (for those vehicles in which the dash takes the VSS signal directly, and thus don't need the VSS 'divided down' for the speedometer). The user will be able to choose between using it as a speedo output, or a PWM, shift solenoid, TCC or selective clutch output. The output has a 16x9 PWM table (unlike the other 2 spare ports which have a 12x1 PWM table), with both axes user selectable. There is more here: http://www.msgpio.com/manuals/mshift/spareport.html. The code is largely done, and I am testing it now. I will post here when it is released as a beta code.

The plan for the 4.1xx series of releases is also to add the ability for other controllers (engine, ABS/DBW, turbo, etc.) to influence the shift algorithm by requesting an upshift or a shift to a specific gear. This will be especially useful for the stability controller code, but I suppose there are other possible uses ('economy mode' for an engine controller, for example, where
the ECU could determine the total fuel per second use from the pulse widths, and requests a shift to get the lowest possible fuel use). We are also working on adding the SPI code for interchip communications.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put the v4.100 beta code here: http://www.msgpio.com/manuals/mshift/V41code.html

This codes adds the spare output 0 functions for the speedo output (on PWM1). Like spare ports 1 and 2, all modes have pulse width modulation; but spare port 0 uses a 16x9 table (instead of 12x1 for sp1 and sp2), with user selectable indices on both axes.

This output may prove useful for those who have no need of a 'divide down' output for their dashes' speedometer (to convert the ~95000 pulse/mile from the VSS to ~2000 pulse/mile for the speedo). Many newer vehicles take the speedo output for the instrument panel directly from the VSS - so the speedo output was 'wasted'. In this new beta code, the output can be:

Speedo Output: Can be used as a speedometer output. Signal will be derived from VSS input. See this link: Output Pulse/Mile for more information. This is the same as the sole speedo output function for this output is previous codes.

PWM Output: Use the only PWM 144 element 16x9 table and OFF value to set the state. This setting relies on the 'PWM active' parameter to determine when the PWM state is ON or OFF. The PWM can be set to a range of values from 0% to 100% in 144 bins (and the user can select if the interpolated PWM percent varies with load, temperature, speed, or engine rpm. The user can also set a single separate OFF value for the PWM. If the user doesn't want varying PWM, and wants and ON/OFF output instead, they can simply set all the table values to 100% and the OFF value to 0% (or vice-versa). PWM can be always ON, ON only during shifts, or ON except while shifting.

TCC Output: Output is ON (PWM% from the 16x9 table for spare port 0) while TCC is engaged, OFF otherwise. None of the spare port TCC settings affect the main TCC output on PT3 (which has its own PWM frequency, PWM algorithm, etc.)

Shift Solenoid Output: Output state is changed at some shifts based on user's output pattern. PWM% from the 16x9 table for spare port 0. Note that if you want to have a constant PWM% for the shift solenoid, you should enter that value in all 144 bins of the spare output's PWM table. The spare port output becomes Output 8. (As of V2.120 code Spare Port 2 becomes OUTPUT4, Spare Port 1 becomes OUTPUT7.)

Selective Clutch Output: Output is ON (PWM% from the 16x9 table for spare port 0) while shifting AND Clutch Output1 Pattern is ON for target gear, OFF otherwise. This is similar to the PWM mode 'ON only during shift' except that the user can select which shifts are active, whereas the 'ON only during shift' is active during ALL shifts.

Note that any output that is pulse width modulated must have a recirculation diode ( http://www.msgpio.com/manuals/mshift/recirc.html ) installed on the controlled device. It does not hurt to have such a diode installed on every output, even if it is ON/OFF.

The help file for this code is here: http://www.msgpio.com/manuals/mshift/V41tune.html

This experimental beta code has had some testing, but testing is not complete. Use only with great caution.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put the latest full release 2.201 code here:

http://www.msgpio.com/manuals/mshift/V2code.html

S19: http://www.msgpio.com/manuals/mshift/fi ... 01.abs.s19
INI: http://www.msgpio.com/manuals/mshift/fi ... t_2201.ini
Help: http://www.msgpio.com/manuals/mshift/V22tune.html
Loading instructions: http://www.msgpio.com/manuals/mshift/V2code.html#load

This code fixes a few errors in the park/neutral/reverse operation that had crept into the code since the adoption of the V4 base for code. See: viewtopic.php?f=4&t=320 for more details on the changes (thanks, Jacco!).

This is the code people should start with on a new MShift controller.

V4.102 code with similar changes will be released shortly (there may be a bug in it I need to sort out).

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

4.102 beta code has now passed initial testing and has been posted here:

http://www.msgpio.com/manuals/mshift/V41code.html

This code has the same park/neutral/reverse bug fixes as 2.201 release code. Thanks Jacco (aka. Mustang68)!

It also can use the speedo output as a spare port (sp0) like 4.100 code. There is more on that here: http://www.msgpio.com/manuals/mshift/spareport.html

This code is intended for advanced users who are willing to test and troubleshoot as required.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have posted 4.103 beta code here: http://www.msgpio.com/manuals/mshift/V41code.html

This code:
- fixes a LED issue in Reverse reported by Jacco (thanks!), see: viewtopic.php?f=4&t=325
- allows for separate Park and Neutral LED patterns,
- allows the user to set the LEDs to alternate (flash) between two user set patterns (at 1 Hz) in Park and Neutral (as well as the previous Reverse flashing).

The 2.201 release code will get the fix for the Park LED issue (but not the flashing, etc.). That will be released as 2.202 shortly, pending further testing.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

Full release MShift code version 2.202 is now available from this web page:

http://www.msgpio.com/manuals/mshift/V2code.html

This code has a fix to the flashing LED patterns in Reverse (thanks to Jacco for pointing this out here), but no other changes.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

All,

I have put new versions of the release and beta codes up on the site:

Release - 2.203: http://www.msgpio.com/manuals/mshift/V2code.html
Beta - 4.104: http://www.msgpio.com/manuals/mshift/V41code.html

Both codes contain fixes to the spare port PWM logic (many thanks to tobmag! There is a full discussion here.). This is tested and appears to work well.

As well, a 'dead band' has been added to the voltage based manual gear lever determination. In the 2.203 code, this dead band is fixed at 0.0244 volts (5 ADC counts). In the 4.104 code, the user can set this value between 0 and 0.25 Volts. See this link: http://www.msgpio.com/manuals/mshift/V4tune.html#i for more information. This is untested - it was released a while ago, but not commented on by the user with the issue, so we will assume it works for that user.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

All,

I have put the latest 4.110 beta code here: http://www.msgpio.com/manuals/mshift/V41code.html

This code:
- Adds a user option to flash indicator LEDs at 1Hz in forward gears if shift mode is manual. The user parameter is under 'LED Patterns -> Flash LEDs in Manual'. For more info see: viewtopic.php?f=4&t=349&start=10&hilit=flash+leds

- Adds the nested interrupt infrastructure from latest B&G code, internally called 382x. When enabled, there is a user option (only visible if COMMS_382X is activated) otherwise it does not use the nested interrupts. Nested interrupts are much less important on the MShift code than on the engine code, because the VSS routine is very simple compared to the wheel decoder in MS-II. However, for this release, the old comms are used for release, as I have not worked all the bugs in the new comms out yet. User *must not* activate COMM_382X in INI (in TS under Project Properties -> Settings) or the communications WILL FAIL.

- Adds user option (General Settings -> ISS/non-CAN Tach Settings -> TCC/Trans Slip Reporting) to report either converter or internal slip (only available if using ISS). Furthermore, user settable spark advance and fuel adjustments (General Settings -> Timing and Fuel Adjustments -> under Slip Based Retard and Fuel Adjustments) have been put in place when:
-- slip is above a user set threshold (100% is no slip, anything else is slip, where slip is defined as (ISS/(VSS*internal gear ratio)) * 100%
-- CAN is enabled,
-- an ISS input is activated (General Settings -> ISS/non-CAN Tach Settings -> ISS/Tach Input Usage),
-- a minimum user-set load threshold is achieved.
-- the trans is not shifting (i.e. the controller is in neither of the pre-shift 'pressure adjustment delay' nor the post-shift 'shift completion delay', both of which are existing user settings.
To better reflect the new options, all instance of "converter_slip" in the INI were renamed to "slip", so users that have custom formulas may need to adjust them. For more information on how and why the slip code was added, see: viewtopic.php?f=4&t=545

- Fixes a typo in the ISS calculation to use current gear instead of speed as index. This was causing many of the reported ISS issues.

- Exposes the 2-point pressure sensor calibration values. This sets up a pressure sensor based on two (voltage, pressure) points. All the slope/intercept calculation is done internally, so the user doesn't have to do the math. The new 2-point parameters are under 'General Settings -> Standard Inputs/Outputs Configuration'. For more info, see: viewtopic.php?f=4&t=315#p2746

- Fixes an inpram incrementing error in the INI (affected primarily the recently added dead band voltage for the voltage based (Ford) shift lever code).

The documentation has not been updated to reflect these changes yet, but I hope to do that shortly. It will be here: http://www.msgpio.com/manuals/mshift/V4tune.html

This code has had some bench testing, but has not been exhaustively proven, so use with caution.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

All,

I have replaced 4.110 code with 4.111. This code has no added features or user settings, but does:

- Fix a scaling error that was in the slip calculation (for internal slip with an ISS only). Thanks to those that pointed this out privately!
- Add improved logic to make sure the slip adjustments (over CAN to the engine ECU) are cancelled when shifting.

Also, the engine rpm when engine rpm is now limited to be at least 99 when it is calculated from the VSS (using the output shaft speed and current gear ratio). If the vehicle isn't moving, then the 'non-CAN' rpm calculates to 0. Setting a minimum is necessary because some functions, like line pressure adjustments based on the 16x9 table, check for rpm > 0 to make sure the engine is running before taking action. This does not affect the engine rpm if it is sent over CAN, or if the ISS input is used to get the engine tach signal. This lower rpm limit was in the 4.110 code, but I forgot to announce it.

As usual, the code is here: http://www.msgpio.com/manuals/mshift/V41code.html

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

All,

I have put 2.204 release code here: http://www.msgpio.com/manuals/mshift/V2code.html

This code adds no new functions or user settings, but incorporates the same ISS calculation fix as the 4.110/4.111 code released in the preceding post.

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