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


MegaSquirt® Connection Troubleshooting Guide

This troubleshooting guide is intended to help you sort out connection issues between your laptop and MegaSquirt®. Typically these are things like TunerStudioMS error messages of the sort "Controller code version does not match signature ..." (which is caused by an INI file not matching the loaded code, in this case) or "ERROR: Command not recognized, e=0xE1" which usually means a serial port connection with a MegaSquirt® controller connected to it was not found.

There are certain things that have to be in place and functional for MegaSquirt® to talk properly to your laptop:

We will go through each of these in turn for either MegaSquirt-I or MegaSquirt-II.

MegaSquirt-II:

  1. With 2.88+ code, the first thing you must do is set the ECU Type (under 'Fuel Set-Up/General') to match your hardware (MS-II or MicroSquirt™), MegaTune will not let you change anything else until you do this. Do not change settings, expect the stim to work, load an MSQ, etc., until you have set the ECU Type (MS-II = 1, MicroSquirt® = 2, the MS-II Sequencer will be 3). This setting applies to MS-II derivatives with code 2.88 or higher code only.

    ECU Type setting was inserted to head off the potential MicroSquirt® problems due to the coils being turned on with the old default configuration. As of the 2.88 code, if ECU Type is not set, the code will put the ignition outputs in a safe state (cycling the rpm from 0 to 8000 rpm, and also flashing the fuel pump LED) and wait until a known ECU type is put in by the user.

  2. Use the portCheck.exe program that comes with MegaTune to make sure you are trying to connect using the appropriate com port. portCheck.exe should be in the MegaTune directory, something like: C:\Program Files\MegaSquirt\MegaTune2.25\portCheck.exe (double click on it to run it). Make sure MegaSquirt is connected and powered up, and portCheck will report the proper com port and code signature info if it is able to connect.

  3. If you have a MegaSquirt® controller, be sure that the DB9 connectors are fully seated at both ends of the cable. if you have a MicroSquirt® EFI controller, be sure the DB9 and mini-stereo connectors are fully seated.

  4. Check the serial port on the laptop/PC. We need to verify that your laptop/PC actually has a functional serial port before proceeding.
    1. If you have a USB/serial adapter instead of a built in serial port:
      • You may have to play with the USB adapter COM port settings in Windows for the adapter to get it to work (see Control Panel/System/Hardware/Device Manager).
      • Make sure that your com port settings are correct for your serial port or your USB/serial cable. For example, change the baud rate (under 'start/Control Panel/System/Hardware/Device Manager/Ports (COM & LPT)') to 115200 for MS-II.
      • Try re-installing your USB driver.
      • Check this thread on the www.msefi.com support forums for new info: USB to Serial Adapters.

    2. First check that nothing else is using the serial port, such as a fax/modem. To find if other programs are running, first try 'Ctrl-Alt-Del' all together (but just once). This should list all the programs that are running. Look for any that *might* be a fax/modem (you must keep systray and explorer).

      You can kill any extraneous programs you find directly from the dialog that springs up when you do ctrl/alt/delete, or you can look in 'start/program' to see if any fax/modem software is listed and configure it to not start on power-up. Alternatively, you can also type msconfig in the run box to see what is starting and block any program from loading.

    3. On your laptop PC, be sure to disable any other programs that might try to use the serial port, etc. This includes Infra-red communications (IrDA). For example, if you have your IrDA switched on it might go looking for a connection at regular intervals (usually in the middle of something important).

    4. Then recheck the serial communications tests in the manual (you should have already checked them during assembly, but if you bought your MegaSquirt® controller already assembled, you need to verify the serial com port on YOUR computer): Note: If you have MegaTune installed, you can use Mini-Terminal (under 'Communications' in MegaTune) instead of hyperterminal. Mini-term does local echo, so you should see every character you type appear on the screen twice (pop it up and hit F1).

      You may have to try different com port numbers (COM1, COM2, ... COM99) to find out which com port number is assigned to the physical connection you are using for MegaSquirt. Be sure to note which com port you successfully used for the loopback tests, you will need to enter it later into other downloading and tuning programs.

      This 'loopback test' verifies that you have a working serial port on your laptop/ PC computer, and that you have selected the correct one to communicate with MegaSquirt® EFI Controller, however it does not distinguish between a null modem cable and a straight-through cable.

    5. You may have to play with the USB adapter settings in Windows for the adapter to get it to work (see Control Panel/System/Hardware/Device Manager). If there is a 'buffer' setting, set it as low as you can (often 1 or 0).
    6. Make sure that your com port settings are correct for your serial port or your USB/serial cable. For example, change the baud rate (under 'start/Control Panel/System/Hardware/Device Manager/Ports (COM & LPT)') to 9600 for MS-I.
    7. Try re-installing your USB driver.
    8. Search the forums at www.msefi.com for new info on: "USB to Serial Adapters".

    9. If you have another computer available (a laptop or another desktop, for example), you might want to try that to connect to your MegaSquirt® controller - this can help rule out a damaged or mis-configured serial port on the computer.

  5. Check the power supply. MegaSquirt® must be powered in order to communicate. Check the DC Volts at the stim's terminal block while powering MegaSquirt. It should be at least 7.5 Volts, preferably 8.5V or above.

    A 9 Volt battery will drain very quickly. You might measure close to that at the battery. But if that's 'open circuit' voltage (i.e. measured across the unconnected terminals of the battery), the voltage is likely much lower when powering MegaSquirt (9V batteries are only designed to produce about 1/3 the current MegaSquirt® controller normally draws).

    A noisy (or failing) power supply will also do what you see, as it causes the MegaSquirt to continually reset, starting to communicate but failing again and again.

    You can use a cheap wall-wart style AC/DC adapter (you might salvage these from dead electronic devices whenever you can). You'll want a 200 to 300 milliamp, 9 to 12 Volt DC (VDC) adaptor. Because these adaptors are usually unregulated, the lower the current draw below their rating, the higher the voltage will be. MegaSquirt and the stim usually draw around 150 to 250 milliamps, this needs to be at least 9 Volts and shouldn't be much over 17 Volts.

    The best way to be sure is to use a voltmeter on the two wires from wall wart without it attached to anything (just plugged in). Then the current draw is essentially zero, and the voltage is at its maximum. If it is below 17 Volts, its not too much. If it passes that test, then hook the wall wart adapter to MegaSquirt/stim and check the voltage again - if it's over 9 Volts or so you are have found a suitable power supply!

    Then check the power at the 40-pin socket as described in the assembly guide for your main board.

    To test, install a battery in the stimulator, and plug it into the DB-37 connector on the ECU board. Next, using a DMM (digital multi-meter) on DC VOLTS setting, check for 5 volts on the 40-pin processor socket you installed in step #3 (which is empty) - there should be 5 volts between pins 19 (ground) and 20 (+5), there should also be +5 on pin 1 and 31 (check against ground at pin 19), and ground potential on pins 2 and 32 (check against +5V on pin 20).

    An easy way to probe this is by using a component lead that you cut from one of the resistors and wrapping around the DMM probe tip, then plugging into the socket. Remember that with the PCB oriented so the copyright notice is at the bottom (and can be read 'right-side up'), pin #1 on the 40-pin socket is on the lower right (at the same end with the notch), then goes up the 20 pins on that side, then over to the other side top, then down - it traces a counter-clockwise circle.

    Check each box below as you measure the voltage between the ground pins across the top and the +5 pins down the left. You should get a voltage between 4.9 to 5.1 volts in each case (if your multi meter is accurate). Unplug the stimulator when finished.

    Pin
    grounds
    2 19 32
    1
    (5 Volt)
    ____ ____ ____
    20
    (5 Volt)
    ____ ____ ____
    31
    (5 Volt)
    ____ ____ ____
    (Reinsert MS-II after testing, be sure to get it the correct way around - the 6-pin header should be nearest the edge of the PCB.)

  6. Check the serial cable and serial circuit. You need to ensure that you cable is straight-through and not a null modem cable, as well as that it doesn't have other functional problems. To do this:

    This second 'loopback test' verifies that you have a working serial port on your laptop/PC computer, and it does distinguish between a null modem cable and a straight-through cable. It also verifies that the serial com circuit on MegaSquirt® itself is working. However it does not necessarily verify that the com port speed setting (baud rate) is correct.

    If you do not pass this test, you may have a faulty solder joint in the com circuits, you need to inspect every solder joint very carefully, and touch up any that don't look perfect. If everything is good on the solder joints, you have not missed installing any components, and nothing is shorted or bridged, then one or more of the serial circuit components is likely damaged (such as the MAX232).

    Check on the MAX232 (U6) that you have:

    • 5 Volts on pin #16,
    • ground on pin #15 (less than 1 Ohm from pin 15 of the MAX232 to the center pin of the voltage regulator).

    Then check the continuity between:

    • pin 12 of the MAX232 to CPU pin 13 (RxD-1)
    • pin 11 of the MAX232 to CPU pin 12 (TxD-1)
    Both of these should be under 1 Ohm. Check that you have 5.0 Volts on pin 16 of the MAX232 when the MegaSquirt® main board is powered up. Also check that you get less than 1 Ohm from pin 15 of the MAX232 to the center pin of the voltage regulator.

    Check the continuity from the MAX232 to the DB9 pins:

    1. DB9 pin #1: connects to MAX232 pin #16,
    2. DB9 pin #2: connects to MAX232 pin #14,
    3. DB9 pin #3: connects to MAX232 pin #13,
    4. DB9 pin #4: connects to DB9 pin #6
    5. DB9 pin #5: connects to MAX232 pin #15,
    6. DB9 pin #6: connects to DB9 pin #4
    7. DB9 pin #7: connects to MAX232 pin #8,
    8. DB9 pin #8: connects to MAX232 pin #7,
    9. DB9 pin #9: connects to VCC (5.0 Volts at the voltage regulator pin furthest from the DB9),
    Each of the above connections should have 1.0 Ohms or less between the specified points when the MegaSquirt® is not powered. If you get higher resistance than this, you may need to touch up solder joints, or inspect the board for burnt traces. (Note that the DB pin numbers are imprinted into the plastic - though they may be hard to see.)

    If those are all good, then suspect the MAX232 itself.

  7. Check for a functional processor. If the processor has power on the 40-pin socket, but none of the LEDs on the MegaSquirt® or stim respond, then the processor might not be working. This can be because the processor is damaged, or because the crystal is not working. Crystals are fairly fragile, though we have not had failures with the MS-II crystal.

    If you have successfully passed all the loopback test, the crystal is working, and there is power and ground to the appropriate pins on the 40-pin socket, then the processor itself may be damaged.

    If you suspect the processor itself, the first thing to try is to reload the code (see the next step) since this is free and will often solve a processor problem. Of course you need a working serial port to do this, so you may have to try all the other steps first.

  8. Check that you have appropriate code loaded on the processor. For MegaSquirt-II, the daughtercard comes essentially blank, and you have to load code before the processor will communicate with the laptop/PC.
    1. Download the code from the Internet. Get the latest version of MegaSquirt-II code here:

    2. Power down MegaSquirt® EFI Controller,
    3. Put the boot jumper on both pins of the header marker B/LD (for "bootloader") on the MegaSquirt-II (not the main board),
    4. Power up MegaSquirt® (plug in the stim). The LEDs on MegaSquirt® will flash very briefly (if installed), then go out. This is proper response for the LEDs when the MegaSquirt-II goes into bootloader mode (i.e. when the bootloader jumper is on).
    5. Start the downloader program (make sure TunerStudioMS or MegaTune are not running), and select the appropriate COM port (from the loopback tests) and speed (115200 for MegaSquirt-II),
    6. Select the appropriate .S19 file (that you downloaded above), and the downloader will read, write and verify the code to the processor in about 10 seconds or so.
    7. The process ends with a message like "Verification succeeded, 999 records total (4 skipped)."
    8. Shut down the downloader program.
    9. Remove power from MegaSquirt® (disconnect the stim).
    10. Remove the boot jumper (or put it on just one pin of the B/LD header for storage). When you power MegaSquirt® back up again, it should come to life running the newly loaded code.

  9. Install and configure a program(s) on the laptop/PC to talk to MegaSquirt®, this is usually TunerStudio or MegaTune.

    For TunerStudioMS details, see the TunerStudio website.

    MegaTune is not recommended for any newer firmwares, it hasn't been updated in years, and is missing some necessary functionality (as well as many convenient features).

  10. Open TunerStudoMS and set the com port (from your loopback tests) and the baud rate (115200 for MegaSquirt-II) under 'Communications/Settings'.

    Click the links to find more information on Configuring MS-II.

  11. If you have changed code version (or loaded code for the first time), you may need to change the INI file to match the new code. The files have names like "megasquirt-II_2905.ini", where 2905 indicates the 2.905 code it is to be used with.

    (New code versions (2.889+) have their own INI, so for example 2.890 code (Monitor_v2.890.abs.s19) has a specific 2.980 INI (megasquirt-II.ini.2.890).

    You will find the INI files here: http://www.megamanual.com/files/ini/ and the code S19 loadable files here: http://www.megamanual.com/files/code/

    Note that all older 2.XY (prior to 2.889) use the same 2.X INI file. For example, the 2.35 code uses the 2.3 INI file. This is the way the older code upgrades are designed. Major revisions were incremented by +0.1 and require a new INI file, minor revisions (+0.01) use the same INI file.)

    You may also need to install a fresh INI file if you have edited it manually, and made any mistakes (which is easy to do and often shows up as a comms error - typically the controller will connect with the tuning software, but then it will go offline after a second or two, and not re-connect unless the power is cycled - starting the process again).

    You can select new INI to match code you have loaded by:

    1. going to 'File→Project→Project Properties' in TunerStudioMS,
    2. checking the 'Other' box,
    3. clicking on 'Browse',
    4. surfing to the INI, and
    5. double clicking on the correct INI.

MegaSquirt-I:

  1. Check the serial port on the laptop/PC. We need to verify that your laptop/PC actually has a functional serial port before proceeding.
    1. First check that nothing else is using the serial port, such as a fax/modem. To find if other programs are running, first try 'Ctrl-Alt-Del' all together (but just once). This should list all the programs that are running. Look for any that *might* be a fax/modem (you must keep systray and explorer).

      You can kill any extraneous programs you find directly from the dialog that springs up when you do ctrl/alt/delete, or you can look in 'start/program' to see if any fax/modem software is listed and configure it to not start on power-up. Alternatively, you can also type msconfig in the run box to see what is starting and block any program from loading.

    2. Use the portCheck.exe program that comes with MegaTune to make sure you are trying to connect using the appropriate com port. portCheck.exe should be in the MegaTune directory, something like: C:\Program Files\MegaSquirt\MegaTune2.25\portCheck.exe (double click on it to run it). Make sure MegaSquirt is connected and powered up, and portCheck will report the proper com port and code signature info if it is able to connect.

    3. On your laptop PC, be sure to disable any other programs that might try to use the serial port, etc. This includes Infra-red communications (IrDA). For example, if you have your IrDA switched on it might go looking for a connection at regular intervals (usually in the middle of something important).

    4. Then recheck the serial communications tests in the manual (you should have already checked them during assembly, but if you bought your MegaSquirt® assembled, you need to verify the serial com port on YOUR computer): Note: If you have MegaTune installed, you can use Mini-Terminal (under 'Communications' in MegaTune) instead of hyperterminal. Mini-term does local echo, so you should see every character you type appear on the screen twice (pop it up and hit F1).

      You may have to try different com port numbers (COM1, COM2, ... COM99) to find out which com port number is assigned to the physical connection you are using for MegaSquirt. Be sure to note which com port you successfully used for the loopback tests, you will need to enter it later into other downloading and tuning programs.

      This 'loopback test' verifies that you have a working serial port on your laptop/ PC computer, and that you have selected the correct one to communicate with MegaSquirt® EFI Controller, however it does not distinguish between a null modem cable and a straight-through cable.

    5. You may have to play with the USB adapter settings in Windows for the adapter to get it to work (see Control Panel/System/Hardware/Device Manager). If there is a 'buffer' setting, set it as low as you can (often 1 or 0).
    6. Make sure that your com port settings are correct for your serial port or your USB/serial cable. For example, change the baud rate (under 'start/Control Panel/System/Hardware/Device Manager/Ports (COM & LPT)') to 9600 for MS-I.
    7. Try re-installing your USB driver.
    8. Check this thread on the www.msefi.com support forums for new info: USB to Serial Adapters.

    9. Finally, if you have another computer available (a laptop or another desktop, for example), you might want to try that to connect to your MegaSquirt® controller - this can help rule out a damaged or mis-configured serial port on the computer.

  2. Check the power supply. MegaSquirt® must be powered in order to communicate. Check the DC Volts at the stim's terminal block while powering MegaSquirt. It should be at least 7.5 Volts, preferably 8.5V or above.

    A 9 Volt battery will drain very quickly. You might measure close to that at the battery. But if that's 'open circuit' voltage (i.e. measured across the unconnected terminals of the battery), the voltage is likely much lower when powering MegaSquirt (9V batteries are only designed to produce about 1/3 the current MegaSquirt® controller normally draws).

    A noisy (or failing) power supply will also do what you see, as it causes the MegaSquirt to continually reset, starting to communicate but failing again and again.

    You can use a cheap wall-wart style AC/DC adapter (you might salvage these from dead electronic devices whenever you can). You'll want a 200 to 300 milliamp, 9 to 12 Volt DC (VDC) adaptor. Because these adaptors are usually unregulated, the lower the current draw below their rating, the higher the voltage will be. MegaSquirt and the stim usually draw around 150 to 250 milliamps, this needs to be at least 9 Volts and shouldn't be much over 17 Volts.

    The best way to be sure is to use a voltmeter on the two wires from wall wart without it attached to anything (just plugged in). Then the current draw is essentially zero, and the voltage is at its maximum. If it is below 17 Volts, its not too much. If it passes that test, then hook the wall wart adapter to MegaSquirt/stim and check the voltage again - if it's over 9 Volts or so you are have found a suitable power supply!

    Then check the power at the 40-pin socket as described in the assembly guide for your main board. To test, install a battery in the stimulator, and plug it into the DB-37 connector on the ECU board. Next, using a DMM (digital multi-meter) on DC VOLTS setting, check for 5 volts on the 40-pin processor socket you installed in step #3 (which is empty) - there should be 5 volts between pins 19 (ground) and 20 (+5), there should also be +5 on pin 1 and 31 (check against ground at pin 19), and ground potential on pins 2 and 32 (check against +5V on pin 20).

    An easy way to probe this is by using a component lead that you cut from one of the resistors and wrapping around the DMM probe tip, then plugging into the socket. Remember that with the PCB oriented so the copyright notice is at the bottom (and can be read 'right-side up'), pin #1 on the 40-pin socket is on the lower right (at the same end with the notch), then goes up the 20 pins on that side, then over to the other side top, then down - it traces a counter-clockwise circle.

    Check each box below as you measure the voltage between the ground pins across the top and the +5 pins down the left. You should get a voltage between 4.9 to 5.1 volts in each case (if your multi meter is accurate). Unplug the stimulator when finished.

    Pin
    grounds
    2 19 32
    1
    (5 Volt)
    ____ ____ ____
    20
    (5 Volt)
    ____ ____ ____
    31
    (5 Volt)
    ____ ____ ____
    (Be sure to insert the processor the correct way around after testing, the notch should go at the end of the 40-pin socket closest to the edge of the PCB.)

  3. Check the serial cable and serial circuit. You need to ensure that you cable is straight-through and not a null modem cable, as well as that it doesn't have other functional problems. To do this:

    This second 'loopback test' verifies that you have a working serial port on your laptop/PC computer, and it does distinguish between a null modem cable and a straight-through cable. It also verifies that the serial com circuit on MegaSquirt® itself is working. However it does not necessarily verify that the com port speed setting (baud rate) is correct.

    If you do not pass this test, you may have a faulty solder joint in the com circuits, you need to inspect every solder joint very carefully, and touch up any that don't look perfect. If everything is good on the solder joints, you have not missed installing any components, and nothing is shorted or bridged, then one or more of the serial circuit components is likely damaged (such as the MAX232).

    Check on the MAX232 (U6) that you have:

    • 5 Volts on pin #16,
    • ground on pin #15 (less than 1 Ohm from pin 15 of the MAX232 to the center pin of the voltage regulator).

    Then check the continuity between:

    • pin 12 of the MAX232 to CPU pin 13 (RxD-1)
    • pin 11 of the MAX232 to CPU pin 12 (TxD-1)
    Both of these should be under 1 Ohm. Check that you have 5.0 Volts on pin 16 of the MAX232 when the MegaSquirt® main board is powered up. Also check that you get less than 1 Ohm from pin 15 of the MAX232 to the center pin of the voltage regulator.

    Check the continuity from the MAX232 to the DB9 pins:

    1. DB9 pin #1: connects to MAX232 pin #16,
    2. DB9 pin #2: connects to MAX232 pin #14,
    3. DB9 pin #3: connects to MAX232 pin #13,
    4. DB9 pin #4: connects to DB9 pin #6
    5. DB9 pin #5: connects to MAX232 pin #15,
    6. DB9 pin #6: connects to DB9 pin #4
    7. DB9 pin #7: connects to MAX232 pin #8,
    8. DB9 pin #8: connects to MAX232 pin #7,
    9. DB9 pin #9: connects to VCC (5.0 Volts at the voltage regulator pin furthest from the DB9),
    Each of the above connections should have 1.0 Ohms or less between the specified points when the MegaSquirt® is not powered. If you get higher resistance than this, you may need to touch up solder joints, or inspect the board for burnt traces. (Note that the DB pin numbers are imprinted into the plastic - though they may be hard to see.)

    If those are all good, then suspect the MAX232 itself.

  4. Check for a functional processor. If the processor has power on the 40-pin socket, but none of the LEDs on the MegaSquirt® or stim respond, then the processor might not be working. This can be because the processor is damaged, or because the crystal is not working.

    Crystals are fairly fragile, and we occasionally see failures with the MS-II crystal. There's no real voltage test for the crystal, but if your multimeter measures frequency you can look for 32.76 kHz on pin #4 of the CPU (with the non-banded end of D1 as a ground on a V2.2 board, or the heat sink as ground on a V3 board). The crystal is much cheaper and more commonly available than the processor, so you might want to replace it first before deciding the processor is damaged.

    If you have successfully passed all the loopback test, the crystal is working, and there is power and ground to the appropriate pins on the 40-pin socket, then the processor itself may be damaged.

    If you suspect the processor itself, the first thing to try is to reload the code (see the next step). Of course you need a working serial port to do this, so you may have to try all the other steps first.

  5. Check that you have appropriate code loaded on the processor. For MegaSquirt-I, the comes with code already loaded, and you should not have to load code before the processor will communicate with the laptop/PC. However, it's not impossible that the code was wiped or was never loaded by accident. To load the code:
    1. Download the code from the Internet. Get the latest version of MegaSquirt-I code here: The MegaSquirt-I/II downloader comes with the standard B&G 3.00 code as part of the installer, should be in c:/Program Files/MegaSquirt/Firmware/MS-I/megasquirt_v3000.s19 along with some other files.
    2. Power down MegaSquirt® EFI Controller,
    3. Put a boot jumper (a short piece of bare wire or lead cut from a resistor or capacitor, etc.) to connect both holes in the area marked Boot (for "bootloader") on the main board,
    4. Power up MegaSquirt® (plug in the stim).
    5. Start the downloader program, and select the appropriate COM port (from the loopback tests) and speed (9600 for MegaSquirt-I),
    6. Select the appropriate .S19 file (that you downloaded above), and the downloader will read, write and verify the code to the processor in about 10 seconds or so.
    7. The process ends with a message like "Verification succeeded, 999 records total (4 skipped)."
    8. Shut down the downloader program.
    9. Remove power from MegaSquirt® (disconnect the stim).
    10. Remove the boot jumper. When you power MegaSquirt® back up again, it should come to life running the newly loaded code.

  6. Install and configure a program(s) on the laptop/PC to talk to MegaSquirt, this is usually TunerStudio instead, or MegaTune.

    For TunerStudioMS details, see the TunerStudio website.

    MegaTune is not recommended for any newer firmwares, it hasn't been updated in years, and is missing some necessary functionality (as well as many convenient features).

If these steps don't solve your communications problems, please send a message to us on our forums at www.msefi.com. Include any diagnostic info you have gathered from performing the above procedures and tests.



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.
©2006, 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.