The idea was to reflash the cheap Chinese Transistor Tester, which comes with MTester firmaware, hoping that the measurements of ESR and Loss for electrolytic capacitors will be more accurate. In the end it took more time to reprogram the Atmega 328p chip, because lots of firmwares did not work for that specific model. Only 2 firmwares worked (from here). The reflashing was done using Arduino Uno as ISP reflasher. The tester is supposed to be GM328 but the official firmware from the trunk did not work for me. Here is the version that I used, also with the AVRdudeprogramer:
The complete manual about the new firmware can be found here.
It is also easy to program directly from the commandline in windows by creating a .bat file with the following (and specifying the appropriate COM port):
REM Writing Flash + EEPROM + Fuses (L=F7, H=D9, E=FC) avrdude -c avrisp -p m328p -P COM6 -b 19200 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0xFC:m
The only difference is that somehow I had to use some other settings, which are also frequently mentioned on forums, so instead of ‘FC’ I had to put ’04’.
The SPI interface for this tester is a bit different from the pictures available online (see the screenshots):
In my case, the terminals are actually swapped. So Vcc is at MISO, MOSI is at SCK and GND is at RESET. Correspondingly, my RESET is GND (form the picture), SCK is MOSI and MISO is Vcc. See also images below for the connections:
Arduino Uno needs to be configured as ISP programmer by loading the corresponding sketch from File->Examples->11.ArduinoISP
The only modifications in the code is to use pins 11 12 and 13 for the ISP interface:
For the programming AVRDUDEPROG was used with the following parameters:
For running on Mac:
export PATH=/usr/local/CrossPack-AVR/bin:$PATH avrdude -c avrisp -p m328p -P /dev/cu.usbserial -b 19200 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m