Back to index


MS3

Serial connection setup

Getting correct serial communications between your computer and Megasquirt is critical to enable tuning.

Almost all reported user problems are actually a computer setup problem, so follow these steps to get your settings right.

1. Serial connection identification.

The Megasquirt usb and serial ports



Megasquirt-3 has a built-in USB-serial connection (FTDI) and can be connected to your computer with a USB A-B cable, or via the DB9 serial connector. (Use one or the other.)



Standard DB9-DB9 straight through serial cable:




Computer DB9 serial port




Computer USB ports




Typical USB-serial cable:




Typical USB A-B cable:




2. Choose a connection
a. Direct USB A-B cable.
b. Direct serial cable.
c. USB-serial adapter and serial cable. (You might already have this if you used an earlier Megasquirt version.)
Only use one connection at a time.

If you are using a USB-serial cable or USB A-B cable then ensure you have installed the drivers (if required) before plugging in the cable for the first time. The built-in USB-serial interface on the MS3 uses a chipset from FTDI.

3A. (Windows only) Download latest drivers from FTDI

The FTDI drivers page is: http://www.ftdichip.com/Drivers/VCP.htm
At time of writing the latest driver package for Windows was 2.08.14: click here to download it

Having downloaded the driver, you should run it and the drivers should be installed. Then insert the USB cable and when Windows asks for a driver, you should be able to follow the automatic install process.

Having installed the drivers, proceed with Device manager..

3B. (Windows only) Open Device Manager on your computer.

There are several ways to do this, and you may have a preferred way. If you don't know how to do this, here are directions for getting into the Device Manager for XP and Vista.

On Windows XP, right-click My Computer and select Manage. This will bring up the Computer Management screen. Select the Device Manager from the list at the left.

For Vista, click the Start button and go to the Control Panel. From there, click System and Maintenance, then click on the Device Manager from there. You may need to enter a password.




If you DO NOT see "Ports" listed in the devices then you do not have any ports setup. This would usually indicate either your forgot to plug in your USB-serial cable or there is a driver problem. Usually the best solution to the driver problem is to unplug the cable, uninstall the driver and then re-install the driver.

Find the Ports section and click the [+] to expand. Then double-click on the port number.




On the Port Settings tab, set the baud rate to 115200, then click on Advanced.




Ensure that the COM port number is 9 or less. If not, change it. It is usually safe to ignore any Windows warning about ports being in use unless you really do have a physical serial port or built-in modem.
The port number you select here is the one you need to use in TunerStudio




While on this page reduce the Latency Timer. 1 is normally ok. The default value gives very slow serial.

Now [OK] all windows to close them and then close the Device Manager.

Only for Windows - Portcheck
Right-click and save portcheck.exe to your computer and then run it.

Sample output - in this example there is a Megasquirt 2 with MS2/Extra firmware loaded on COM1.

3C. (Linux only) USB serial adapters are typically used as /dev/ttyUSB0. All recent Linux kernels include support for the built-in FT232RL USB-serial adapter. You might want to use the lsusb command to check that the adapter has been recognised. dmesg can be used to see what port number has been assigned.

3D. (MacOS only) Install the FTDI driver from http://www.ftdichip.com/Drivers/VCP.htm. Then plug in the cable and power on the MS3. Either use Autodetect in TunerStudio or check the /dev directory for a port such as /dev/cu.usbserial-XXXXX .

4. Take a note of the COM port number listed above. In the Windows example it was COM1. Most drivers allow you to change the com port number. Set to COM1 if it is free.

5. Use this COM port number when setting up your tuning software.

6. Hopefully that should be sufficient to get you connected, if you still experience difficulties, there are additional tests to try.

Additional diagnostics

These diagnostics will only work once firmware has been loaded to the chip - ensure you have loaded the firmware first.

7. Start TunerStudio (or other tuning software) and open Communications -> Miniterminal. Ensure your Megasquirt is powered and connected to your computer.

Select the port as above (i.e. if your connection was COM5 in device manager, then choose COM5 here.)

Select the baud rate.

MS3 = 115200

Click to Open the port.

8. Type a capital 'S' and you should see a signature string returned in the lower window as shown here. If you do not then there is a serial problem somewhere.




9. (Not for direct USB.) Unplug the serial cable from the Megasquirt and carefully short pins 2 & 3. This performs a "loopback" test where the serial signal should go out from the computer, through the short and back into the computer again.




10. (Not for direct USB.) With the pins shorted as above, type in something to Miniterminal. Whatever you type into the top window should appear in the lower window. As shown here this indicates the computer serial end is working ok.




11. (Not for direct USB.) If test 10 fails then you have a serial driver problem on your computer - consult the documentation that came with the computer or cable.

12. If test 10 passes but test 9 fails, there might be something wrong on the Megasquirt end of things - consult the support forums or your reseller.

13. If tests 9 and 10 pass but you are having problems with the tuning software, it is most likely a settings problem within the tuning software itself. Double check the COM port and baud rate.


14. Optional trouble-shooting step - NOT FOR DIRECT USB. Turn off power and remove Megasquirt case.

15. Very carefully, prise out the CPU U1. Lift it out progressively by prying up each end a fraction at a time. Be certain not to bend the pins.

16. Apply jumper betweens pins 12 & 13 of U1

17. Ensuring there are no shorts underneath the board, re-connect your serial or USB cable and apply power.

7. Start TunerStudio (or other tuning software) and open Communications -> Miniterminal. Ensure your Megasquirt is powered and connected to your computer.

Select the port as above (i.e. if your connection was COM5 in device manager, then choose COM5 here.)

Select the baud rate.

MS3 = 115200

Click to Open the port.

Any characters you type into the top window should be quite literaly "looped back" to the bottom window.

When done, turn off power, re-install CPU and re-install case.

If you have a question, comment, or suggestion for this FAQ please post it on the forum.
Last Updated: 10/07/2009 15:45

No part of this manual may be reproduced or changed without written permission from James Murray, Ken Culver and Philip Ringwood.