Can this only be a wiring error?

I had my project running sweetly on a UNO, including displaying data on a 16x2 LCD.

I carefully noted down all the wiring connections, showing colour and pin numbers at both ends for all 12 wires (1-6, 11-16). Then I carefully (!?) transferred all of them to a Nano, using exactly the same pin numbers, plus 5V and Gnd, and the 10k pot connection for backlight setting.

But although other aspects of the sketch worked as before, the LCD did not. It just shows the first line of 16 backlit rectangles on startup, and does nothing else. Naturally I then uploaded the simplest possible sketch, HelloWorld from the examples, and that was the same.

After an hour or so I still can't see any wiring mistake, but I suppose that's the only logical conclusion, apart from the LCD now being damaged? IOW, are the pins identical, with no special exceptions? If so then I'll tediously have to transfer it all back to the UNO as next step.

What else is going on in the sketch and are there any other external connections apart from the display ?

How much memory does the sketch use ?

You refer to using a Nano. Please confirm that it is a normal Nano and not one of the boards that use the Nano name but are very different

From that picture, I can see that the writing mistake is.... Oh, no I can't see anything.

Let's take a look at your forum stats

Are you now going to tell us you are new to the forum, and don't know how to post a question correctly?

3 Likes

I don’t have a clue what you mean, please explain the point you’re trying to make.

The point @UKHeliBob is trying to make is that "Nano" is ambiguous these days. (Even "Uno" is ambiguous now, BTW)

2 Likes

Their 5V facilities are different.

The relevant sketch is now HelloWorld which I assume you’re familiar with? Apart from adding a line of serial monitor print, nothing else was expected except the message, which failed to appear.

The only external connection, apart from the USB, is the one I mentioned, the backlight pot.

Composing this away from PC but I recall memory usage was quite modest.

Generate an annotated schematic showing exactly how you have wired it, then post it. I have a feeling by the time you finish that you will find your wiring mistook.

Thanks, I'm going ahead with removing all the wiring again anyway, and if the mistake doesn'r emerge during that I'll reconnect to UNO, then report back .

Forgot to reply to that point, and still not sure I can confidently do so. What's the definitive test? Here's a photo of it:

When you say “Pin Numbers” do you mean “Pin Names”. The Nano pin names are arranged in a different order than on the Uno. You did make an accurate schematic before you built this project I hope. Or at least an “as built” schematic after you got it working.

That it is simply a Nano rather than a Nani Every, Nano 33 IOT, Nano 33 BLE etc

The picture that you posted looks like it is a Nano

Thanks. I thought maybe you meant a 'clone', which it might well be.

I reckon I've found the cause. I'd pulled all the Nano wires before I found the culprit: the 5V end of the backlight 10k pot had broken, inside the case.

I'm not going to risk fixing it tonight.

Somewhere I bet there's a list of 'symptoms' for this popular 16x2, and I expect one of them might be something like
"Line 1 illuminates brightly on applying power. Line 2 is blank. Nothing gets printed. CHECK BACKLIGHT CONNECTIONS."

It sounds like you have tracked the problem down so the answer to the question in the topic title is, yes

1 Like

No, I'm pretty sure it's something else. The backlight appears to be working from your first photo. There is only one backlight and it illuminates the whole display, not just one line. The pot does not control the backlight. It controls the contrast. The wrong contrast does not cause one line to be all squares and the other line to be blank, it would affect both lines the same way.

The top line showing squares and the bottom line being blank is indeed a symptom of a well known problem with 16x2 LCD. It's not getting initialised. That means one or more of the data connections is incorrect/missing/faulty.

  1. Solder joints bridged on the LCD.
  2. RW not connected to GND
  3. LCD initialization incomplete.

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