Firmware updates

Updates

MyECU and the Optimiser are all able to be updated to a later version of software. Either to fix a bug or enhance.

A cable is required from the PCs parallel port to the ECU's 5 pin header. All, except the earth, require an inline resistor of about 68ohm in the cable, although my cable actually has about 10ohm.

If you look at the 5 pin connector on the layout of MyECU, we'll call the top pin ( earth pin ), pin 1. Below are the connections that need to be made.

ECU - 25 pin Parallel port plug ( this should have numbers on it )
1 - 18 ( direct )
2 - 2 ( 10-68ohm)
3 - 10 ( 10-68ohm)
4 - 3 ( 10-68ohm)
5 - 4 ( 10-68ohm)

Applying the upgrade

Important note: Although the hardware and maps are open, the ECU software is not. The software updates are not to be used for any other purposes other than to help you keep your ECU functional and perform upgrades. It is not to be used to disassemble the ECU software or create any other chips. You may create one backup chip for use on your ECU.

First you need to get hold of a program that can program the Atmel AVR chip. AVRDUDE is an open source program that I use to flash the AVR chips. This can run under Windows or Linux.

Typically this will install to C:\AVRDUDE.The executable should be in C:\AVRDUDE\bin. This is assumed to be the directory in the following steps. This is the directory you want to be in for the rest of the upgrade.You should copy the .HEX firmware file into this directory.

Open a command prompt - "Start", "Run", "cmd" for Windows NT or "command.com" for Windows 9X
Go into the directory with the AVRDUDE executable - "cd c:\avrdude\bin"

The next step is the programming of the chip. MyECU must be powered for flashing. Connect the PC printer port to the 5 pin header in the ECU.

Cut and paste one of the following commands into NOTEPAD and save as "FLASH.CMD" ( Windows NT ) or "FLASH.BAT" ( Windows 9X ) in the C:\AVRDUDE\bin directory.

For Atmega32

avrdude -p m32 -c abcmini -e -E noreset -U lfuse:w:0x1F:m -U hfuse:w:0xDF:m -U flash:w:My16M.hex -U lock:w:0x3C:m

For Atmega324p

avrdude -u -p m324p -c abcmini -e -E noreset -U lfuse:w:0xE7:m -U hfuse:w:0xDF:m -U flash:w:My16M_32.hex -U lock:w:0x3C:m

Now type "flash".If all goes well you should see this output

avrdude: AVR device initialized and ready to accept instruction
Reading | ################################################## | 100% 0.00
avrdude: Device signature = 0x1e950
avrdude: erasing chip
avrdude: current erase-rewrite cycle count is -50462977 (if being tracked
avrdude: reading input file "0x1F"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.00
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x1F:
avrdude: load data lfuse data from input file 0x1F:
avrdude: input file 0x1F contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes)
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse writte
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "My16M.hex"
avrdude: input file My16M.hex auto detected as Intel Hex
avrdude: writing flash (32668 bytes):
Writing | ################################################## | 100% 14.39s
avrdude: 32668 bytes of flash written
avrdude: verifying flash memory against My16M.hex
avrdude: load data flash data from input file My16M.hex:
avrdude: input file My16M.hex auto detected as Intel Hex
avrdude: input file My16M.hex contains 32668 bytes
avrdude: reading on-chip flash data
Reading | ################################################## | 100% 9.16
avrdude: verifying ...
avrdude: 32668 bytes of flash verified
avrdude: reading input file "0x3C"
avrdude: writing lock (1 bytes)
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3C:
avrdude: load data lock data from input file 0x3C
avrdude: input file 0x3C contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% -0.00s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude done. Thank you.

Now that you have successfully applied the new firmware you must now reload you map as the above procedure erases the map.