I have one of the China import Transistor Testers, and it seems to work quite well:
http://www.ebay.com/itm/381351024208
I'm trying to compile the source code onto a new ATMega128, but upon upload and startup, the red power LED is on, the LCD screen illuminates, but nothing is displayed. Perhaps I am using the wrong config.h settings? (see attached).
I've tried both this upload command:Code: [Select]make
avrdude -b 19200 -c avrispmkII -p m328p -v -U flash:w:ComponentTester.hex
as well as this one, from the banggood forum, above:Code: [Select]make
avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"ComponentTester.hex":i -U eeprom:w:"ComponentTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m
The chip is exactly the same ATMEGA328P-PU and I am able to burn a bootloader and upload a sample "blink" app from my Arduino.
But I simply cannot seem to make a successful burn of the Transistor tester. Any ideas?
The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar
For writing firmware to the MCU you can use only this command:Code: [Select]avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"TransistorTester.hex":i -U eeprom:w:"TransistorTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m
The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar
So it's a ST7565 but with standard I/O pins. The T3/T4 uses different pins. Please tryCode: [Select]#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
//#define LCD_CS PD5 /* port pin used for /CS1 (optional) */
/*
* Chinese clone T3/T4 with ST7585 display
* - thanks to tom666 @ EEVblog forum
*/
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
Code: [Select]/*
* Chinese clone T3/T4 with ST7585 display
* - thanks to tom666 @ EEVblog forum
*/
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
...
The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar
For writing firmware to the MCU you can use only this command:Code: [Select]avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"TransistorTester.hex":i -U eeprom:w:"TransistorTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m
root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d -DSamplingADC -c ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1
Code: [Select]/*
* Chinese clone T3/T4 with ST7585 display
* - thanks to tom666 @ EEVblog forum
*/
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
I see, you haven't changed the I/O pins. Please changeCode: [Select]#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
toCode: [Select]#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
/*
* Chinese clone T3/T4 with ST7585 display
* - thanks to tom666 @ EEVblog forum
*/
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
so when I go to the mega328_st7565_kit directory and do a make, I get this error, perhaps just missing some files?Code: [Select]root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d -DSamplingADC -c ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1
Is this the JLX12864G-378?
What protocol does it use to communicate?
How did they solve the voltage levels difference on data singals?
it works a bit differently than the software it shipped with (the mega328_st7565_kit code, that I've yet to successfully compile), but at least now I have this version working with a variety of messages displayed and no "main menu".... but the really crazy thing: is I need to look in a mirror to properly see what it says! lol. everything is reversed. perhaps just a bit more fine tuning of the config.h?
#define LCD_FLIP_X
it works a bit differently than the software it shipped with (the mega328_st7565_kit code, that I've yet to successfully compile), but at least now I have this version working with a variety of messages displayed and no "main menu".... but the really crazy thing: is I need to look in a mirror to properly see what it says! lol. everything is reversed. perhaps just a bit more fine tuning of the config.h?
Add the following line to your configuration:Code: [Select]#define LCD_FLIP_X
#define LCD_OFFSET_X /* enable x offset of 4 dots */
/*
* Chinese clone T3/T4 with ST7585 display
* - thanks to tom666 @ EEVblog forum
*/
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_OFFSET_X /* enable x offset of 4 dots */
#define LCD_FLIP_X /* enable horizontal flip */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
@gojimmypi
instead #define LCD_OFFSET_X use #define LCD_OFFSET_Y
#define ENCODER_A PD2 /* rotary encoder A signal */
#define ENCODER_A PD1 /* rotary encoder A signal */
@gojimmypi
instead #define LCD_OFFSET_X use #define LCD_OFFSET_Y
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC /* monochrome graphic display */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
// #define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_OFFSET_X /* enable x offset of 4 dots */
#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_V /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V /* 24x24 symbols, vertically aligned */
//#endif
I will get this tester but I also ordered one of these displays to build my own adding all the additional features (rotary encoder, frequency counter e.t.c) with protection input.
COuld someone help me how to connect this display on the mcu? It has SDA(SI), SCL, A0, RST and CS pins. Is it ST7565 SPI?
so when I go to the mega328_st7565_kit directory and do a make, I get this error, perhaps just missing some files?Code: [Select]root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d -DSamplingADC -c ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1
For the compilation you need to download the complete source code from this link:
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/?view=tar
@Ryana, I have a couple of those MK168's and they both have that issue with 9V batteries - I just assumed there is a reverse protection diode in circuit which would give a 0.6-0.7v drop.
I had an issue when I tried to use the calibration feature on one of them. I didn't have the correct capacitor to hand and ever since instead of giving the "Invalid/no component" message it reports back a capacitor when all the leads are disconnected. I flashed one of the newer firmwares and it's been ok since. Try flashing a fresh firmware.
As a reference device I used an LCR-300 from Voltcraft. The $20 testers included an MTester with V2.07 firmware, an MK-168 with V1.07K firmware, and a Fish4480 with V2.2 firmware.