[SOLVED] Module Tester (v2) LCD not showing any text / menus

SOLVED! Solution begins at this post.

I just finished building the Module Tester (v2 pcb) and the board appears to work after flashing the MCU but I’m not seeing any text on the LCD. The LCD backlight comes on and if I crank the contrast up high I can see all of the dots inside each of the 16x2 rectangles. I’m using the exact LCD specified in the BOM. Yet, I don’t see any text / menu on the LCD no matter where I adjust the Contrast. The only time I see text is if I pull the MCU and power up the LCD, then I see a cursor on the far right position of the top line.

Things I’ve checked:

  • Continuity between LCD pins and the MCU and other points on the PCB: YES
  • Both lines on LCD light up with contrast at max: YES
  • Reflowed solder of the Contrast Trimmer: YES
  • Buttons light up corresponding LEDs when pressed: YES
  • I hear sound from Audio Out, Gate Out, and Clk Out: YES

I also did the LCD troubleshooting steps from the Wiki.

Here’s what I’m measuring on the LCD pins:

2 = 5V
3 = 5V if LCD contrast at zero, 0V if LCD contrast at max
4 = 8.3mV
5 = 0V
6 = 2.7V
7/8/9/10 = 4.98V (but not connected to anything on the board)
11 = 7.0mV
12 = 6.6mV
13 = 5.6mV
14 = 2.5V
15 = 5V

I also tried a second LCD (from some Shruthi-1 BOM that I haven’t built yet) and it doesn’t show any menu text either. I’ve inspected the board with a microscope and I don’t see any faults. My soldering skills are A+.

At this point I’m kinda stumped why I can’t see the menus… I’m not sure what else I should be checking. None of the previous forum posts about non-functioning LCDs have been helpful, as I don’t appear to have the same problem.

Any ideas?

Hmmm so I went and built a Shruthi too, and I’m having the same issue even with a brand new LCD.

Shruthi boots with LED 3 and 7 lit, and responds to pressing the buttons and turning the encoder. LCD contrast is adjusted correctly (I can see the blinking cursor if I power it with the MCU disconnected).

The only common variable between this and the Module Tester is the AVR programmer that I’m using. It’s a USB ASP – cheap Chinese clone. I get no errors when flashing the chip and all other functions seem to be working except the LCD (as much as it’s possible to know without the LCD showing any menus).

Is it likely that somehow the USB ASP could be programming the MCU in such a way that it apparently succeeds, but the MCU can’t properly communicate with the LCD?

Otherwise, I’m still confused as I have tried every troubleshooting procedure outlined on the MI pages for these two devices as well as dozens of forum messages that I’ve found via search.

Thanks for the help.

Armand

Here’s a dump of the output when I flash the MCU. From everything I read, the “warning” about “cannot set sck period. please check for usbasp firmware update.” is irrelevant for the USB ASP Chinese clones, and can be safely ignored.

make bake_all                                                                                                       17:55:10
make -f bootloader/makefile fuses
/usr/local/bin/avrdude -V -p m644p -c usbasp -P usb -B 10 -e -u \
			-U efuse:w:0xfd:m \
			-U hfuse:w:0xd6:m \
			-U lfuse:w:0xff:m \
			-U lock:w:0x2f:m

avrdude: set SCK frequency to 93750 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e960a (probably m644p)
avrdude: erasing chip
avrdude: set SCK frequency to 93750 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "0xfd"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: reading input file "0xd6"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written

avrdude done.  Thank you.

/usr/local/bin/avrdude -B 1 -V -p m644p -c usbasp -P usb \
			-U eeprom:w:shruthi/data/factory_data/internal_eeprom.hex:i \
			-U flash:w:build/shruthi1/shruthi1.hex:i -U flash:w:build/muboot/muboot.hex:i \
			-U lock:w:0x2f:m

avrdude: set SCK frequency to 750000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e960a (probably m644p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: set SCK frequency to 750000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "shruthi/data/factory_data/internal_eeprom.hex"
avrdude: writing eeprom (2048 bytes):

Writing | ################################################## | 100% 20.97s

avrdude: 2048 bytes of eeprom written
avrdude: reading input file "build/shruthi1/shruthi1.hex"
avrdude: writing flash (62406 bytes):

Writing | ################################################## | 100% 22.94s

avrdude: 62406 bytes of flash written
avrdude: reading input file "build/muboot/muboot.hex"
avrdude: writing flash (65510 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 65510 bytes of flash written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written

avrdude: safemode: Fuses OK (E:FD, H:D6, L:FF)

avrdude done.  Thank you.

This is certainly not an issue with the programmer. How likely would it be that it would introduce an error in the code for two completely different devices that would impact the LCD, but nothing else at all!?

1 in a million, for sure :slight_smile:

What other possibility is there that would explain why I’m seeing the same symptom on 2 different (but somewhat similar) devices? This isn’t my first rodeo, so I really doubt it’s my soldering technique – anyway, both the Shruthi and Tester PCBs are fairly simple with very few parts.

I’ve been troubleshooting this all day (many hours) and I’m completely stumped… I’ve tried 3 different LCDs and it makes no difference. They’re all brand new, all legit NewHaven from Mouser.

Are you compiling the fw yourself - if so, which toolchain?

I’m using the regular avr-gcc toolchain installed via Homebrew on OS X 10.15.5 (not the old CrossPack toolchain) – I’ve also tried just flashing the appropriate .hex files manually. Same result either way. I’m really confused since everything but the LCD seems to work properly. I’ve traced everything, triple checked everything, and now I’m seeing the same symptom on two devices? W T F.

I’m gonna go build another Shruthi and try again.

BTW the LCD for the Shruthi is NewHaven NHD-0216K1Z-FSW-FBW-L

The LCD I used for the Module Tester is NHD-0216K1Z-NSA-FBW-L

As far as I could tell, this is the same as the official BOM LCD, just different colors.

Try with the published hex files (you need a very specific older - as in older version than in the dev environment in order to compile these - without looking in my toolchain, I cant remember the exact version).

Well – THIS IS GETTING WEIRD!

I pulled the MCU from a working Shruthi (which someone else built for me) and it works fine in both of the Shruthi PCBs that I just built – I can see the menus and everything responds properly. I also put the MCU that I programmed into the working Shruthi and got a blank LCD.

So… it seems like there is definitely something going wrong when programming the MCU, even though I get no errors from avrdude and the LEDs and buttons seem to otherwise indicate that the MCU is executing the proper code.

What the heck would explain the MCU apparently flashing successfully, some parts of the Shruthi OS working properly, but the MCU isn’t communicating properly with the LCD? (when I have ruled out that it’s something hardware related, like a bad LCD, bad soldering, etc)

Thanks!
Armand

HOT DAMN!

I think I got the Module Tester to work. I see menus now.

I tried flashing manually using these two commands:

avrdude -c usbasp -p m644p -U lfuse:w:0xff:m -U hfuse:w:0xd4:m -U efuse:w:0xfd:m 

avrdude -B 1 -V -p m644p -c usbasp -P usb -U flash:w:module_tester.hex:i -U lock:w:0x2f:m

Now I see a menu! For some reason this:

make -f module_tester/makefile bootstrap

Apparently isn’t working for me, even though I got no compilation or upload errors. I still can’t explain why parts of the Tester seemed to respond properly but I never saw any menus on the LCD.

Could be that the fuses were not set properly, and that the processor was running on the internal oscillator at 8MHz. Then sluggish audio code taking precedence over the UI code, or timing errors in the LCD initialization code?

1 Like

I thought “make -f module_tester/makefile bootstrap” was supposed to take care of setting everything correctly? At least that’s what appears when it runs (e.g. the fuse settings found at the bottom of makefile.mk) – I still have a lot to learn about the software side of these things… thanks for the help.

This command is supposed to take care of everything.

Got the Shruthi LCD to work by doing the following commands. For some reason, git cloning the official repo and doing the steps outlined in the official Shruthi “Firmware Hacking” webpage didn’t work properly (make bake_all, etc) although it gave no errors and the board responded appropriately other than the LCD not showing the menus.

avrdude -B 100 -V -p m644p -c usbasp -P usb -e -U lock:w:0x2F:m -e -u -U efuse:w:0xFD:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m -U lock:w:0x2f:m

avrdude -B 1 -V -p m644p -c usbasp -P usb -U flash:w:muboot.hex:i -U flash:w:shruthi1_YAM0.05.hex:i -U eeprom:w:internal_eeprom.hex:i -U lock:w:0x2f:m

(I flashed it with YAM because why not…)