Can't get LCD HDM16216H-5-S00S display working on Nano Every

Bought a HDM16216H-5-S00S 16x2 LCD display from mouser.com (no backlighting), can't get it to do much of anything with LiquidCrystal library, either 4 data lines or 8. Got it soldered onto a Nano Every. Here's the "datasheet" link from mouser:

https://www.mouser.com/datasheet/2/178/16216h5-18812.pdf

Tried 10K pot 5V to GND with wiper to LCD pin 3, get it to flash some solid blocks occasionally (about 1/2 of one line). Tried a 4.7K resister to GND on pin 3. No luck. Just a blank screen. I've got RW tied to GND.

The Nano (and, therefore, the LCD) are powered over the USB.

Writing the code in the IDE (not web), with Registers emulation: "None (ATMEGA4809)"

Here's my code. The RBn pins defined at the top are not connected (and not used). They are left over from a prior attempt.

// test_LiquidCrystal_lib

#include <LiquidCrystal.h>

static const uint8_t RESET = 13;  // Built-in LED
static const uint8_t RS = 5;
static const uint8_t RW = 11;
static const uint8_t ENABLE = 12;
static const uint8_t DB0 = A3;
static const uint8_t RB0 = 6;
static const uint8_t DB1 = A2;
static const uint8_t RB1 = 7;
static const uint8_t DB2 = A1;
static const uint8_t RB2 = 8;
static const uint8_t DB3 = A0;
static const uint8_t RB3 = 9;
static const uint8_t DB4 = A6;
static const uint8_t RB4 = 3;
static const uint8_t DB5 = A7;
static const uint8_t RB5 = 2;
static const uint8_t DB6 = 4;
static const uint8_t RB6 = 0;   // RX
static const uint8_t DB7 = 1;   // TX, old 23 (AREF)
static const uint8_t RB7 = 10;

//LiquidCrystal lcd(RS, RW, ENABLE, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7);
LiquidCrystal lcd(RS, ENABLE, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7);
//LiquidCrystal lcd(RS, ENABLE, DB4, DB5, DB6, DB7);  // Tie RW to GND

void setup() {
  // put your setup code here, to run once:

  lcd.begin(16, 2);
  //lcd.noAutoScroll();
  //lcd.noCursor();
  //lcd.setCursor(col, row);   sets location where subsequent text written to the LCD will be displayed
  lcd.print("Hello World!");

  Serial.begin(9600);
  Serial.setTimeout(500);    // mSec
  Serial.println("setup done");
  help();
}

void help(void) {
  Serial.println();
  Serial.println("H - help");
  Serial.println("C - clear");
  Serial.println("W<col>,<row>,<text> - write");
  Serial.println();
}

byte swallow(byte c) {
  // Returns 1 on success.
  byte b = Serial.read();
  if (b == c) return 1;
  Serial.print("Expected '");
  Serial.print(c);
  Serial.print("', got '");
  Serial.print(b);
  Serial.println("'");
  return 0;
}

void write(void) {
  byte col = Serial.parseInt(SKIP_WHITESPACE);
  if (!swallow(',')) return;
  byte row = Serial.parseInt(SKIP_WHITESPACE);
  if (!swallow(',')) return;
  String text = Serial.readStringUntil('\n');
  Serial.print("Writing ");
  Serial.print(text.length());
  Serial.print(" chars to position ");
  Serial.print(col);
  Serial.print(", ");
  Serial.println(row);
  lcd.print(text);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available()) {
    byte c = Serial.read();
    switch (toupper(c)) {
    case 'H': help(); break;
    case 'C': lcd.clear(); Serial.println("LCD cleared"); break;
    case 'W': write(); break;
    case ' ': case '\t': case '\r': case '\n': break;
    default: help(); break;
    }
  }
}

You can keep trying random things or post a schematic, not a frizzy picture showing all connections including power and ground. Links to technical information on hardware devices will also help.

Well, I connected a regular HD44780 16x2 to a Nano Every.
And it worked fine with

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);  // Tie RW to GND, pin#3 via 470R to GND

My Nano-Uno Adapter board does not give me access to A6, A7.
And I would never choose 0, 1 for GPIO.

I tried this wiring which also worked. i.e. I replaced your A6, A7 with 8, 9

LiquidCrystal lcd(5, 12, 8, 9, 4, 1);  // Tie RW to GND

A6, A7 are Analog-only on a Uno/Nano.
You can probably use A6, A7 as Digital on an Every but I would not advise it.

David.

Moved all of the wires off of the Analog pins. Didn't work. Also moved the wire to TX. Didn't work. Also replaced the 10K pot on pin 3 with a 500 ohm to GND. Didn't work.

BTW, I thought it was A4, A5 that had to be avoided (also used for I2C). Hadn't heard about A6, A7. What's the reason for that?

OK, I've moved wires around trying the advice of the other responder here. None of that worked. (I guess this all fits under "trying random things").

The only documentation I have is what I posted in the original post (along with the manufacture's part number). It is admittedly quite disappointing... Here's the link to the device that I ordered on Mouser:

Current Wiring:

LCD pin                         Nano Every pin
1  Vss                                GND
2  Vdd                                5V
3  Vl    500 ohm to GND
4  RS                                 D5
5  R/W   tied to GND
6  E                                  D12
7  D0                                 D2
8  D1                                 D3
9  D2                                 D6
10 D3                                 D7
11 D4                                 D8
12 D5                                 D9
13 D6                                 D4
14 D7                                 D10
15 NC
16 NC

How good is the soldering ?

Forget about 8-bit interface. It just wastes wires.
I followed your wiring scheme. It works fine.

LiquidCrystal lcd(5, 12, 8, 9, 4, 10);  // Tie RW to GND, pin#3 via 470R to GND

Your datasheet implies a regular HD44780 or equivalent controller. And the header pins follow the standard 16x2 layout.

Post a photo of your actual wiring.

I am sure that a Mouser product will be 100%.
But you can always buy a cheap Ebay module. Remember to get a yellow/green transreflective LCD. You don't want the ugly Blue ones.

David.

p.s. pin#3 is called VO not V1. 500R should be fine.
If the LCD does not initialise you should see a single row of Black boxes. i.e. readable contrast.

yeah, wondering about "or equivalent"...

This project was soldered by my brother-in-law who has worked as an electronic technician for decades (now retired). Let's just say that his soldering is better than mine. Of course, that doesn't mean that he can't make mistakes. But I've checked his work several times (making sure the wires connect the proper pins), he's checked continuity of the solder joints from the LCD header to the other end of the wires, and checked for continuity between each pair of adjacent header pins.

Here's some pics (I guess I have to post these one at a time -- newbie...):


Uploading: IMG_20220608_161333567.jpg...

I am horrified by your brother in law's soldering.
I suggest that you test the continuity with a DMM.
And check for adjacent shorts with a DMM.

Don't be offended. We have seen much worse !!
Some of my point to point soldering is nothing to be proud of.

I would start by removing the DB0-DB3 wires. They serve no purpose when you uses 4-bit interface.

Oh, and a red marker pen will come in useful to identify signal wires.

David.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.