Click on our menu buttons immediately below to find MegaSquirt® information quickly:


MegaShift™ Code

NOTE: v1.100 code is now obsolete. However, it is still the preferred starting point for writing your own code modifications (due to the free compiler restrictions).

For the 'official' latest code, please see the V2.100 code page.

The MegaShift™ 1.100 release code is here:

V1.100 main.c source code for the GPIO

An uploadable S19 file compiled from the above source is here: Monitor_1100.abs.s19
(Right click and 'save as'.)

Note: When in bootloader mode, the GPIO allows a full 12V to flow in the TCC and Output3 (aka. SolC, 3/2sol) circuits. If your set-up depends on PWM to limit the current in these solenoids, you MUST pull the 5 Amp fuse to these solenoids (shown in this wiring diagram) before entering bootloader mode to load new code. The 4L60E does not need to have the fuse pulled in bootloader mode.

The accompanying INI file is here: GPIO_MShift_1100.ini
(For MegaTune you need to create a project folder with this file in the mtCfg sub-folder - you might have to edit the custom.ini and settings.ini files to eliminate MT start-up errors.) The ini must be renamed GPIO.ini for MegaTune.

The project files for Codewarrior V4.6 Special edition are here: GPIO_MShift_Proj1100.zip (~5MB)


Note: The V2 MShift™ code is here: V2code.html

This MegaShift™ code was developed entirely on Codewarrior 4.6 Special Edition. This compiler (actually a compiler/linker/locator) is available for free from Freescale (which used to be called Motorola):

www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-SUITE-SPECIAL&tab=Design_Tools_Tab

You have to register to get the software. (Note that the link may eventually become stale. If it does, start at www.freescale.com and search for 'codewarrior special edition')

The 'Special Edition' of Codewarrior has a 32 Kbyte code compile limit, and a maximum of 32 files (the number of files and code size are listed on the bottom left side of the Freescale Codewarrior IDE - integrated development environment). This code is under those limits at 30 files and ~27 Kbytes.

The files required to create a loadable S19 file for the GPIO board using Codewarrior are:

This is a list of general blocks in the initial version of the code (in the order they appear in the source code):

Functions:

The code has been written to be as transparent and 'modifiable' as possible. The code is copiously commented, and much of the necessary background material has been included in the source file notes. So the first place to check if you have questions is in the source code comments.



MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational purposes.
MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
© 2004, 2010 Bruce Bowling and Al Grippo. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.