Help........ 16*2 LCD display squares

having a problem with AT-mega328p project with 16*2LCD display and external 220VAC-5VDC power supply project.

the problem appears after a period of 5-7 days as either a rubbish data on screen or completly gets wiped with top row showing squares as showen.

NOTE : after dissconnecting and reconnecting the power readings is back to normal.!!

iuo|690x242

Please post the sketch that shows this problem and a schematic of your project

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

@smsm159 Installation and Troubleshooting is for Problems with the Arduino itself NOT your project. It says so in the description of the section. This is clearly about YOUR project therefore I have moved your post here.

thx

You're not alone facing odd things in an LCD.
I've code printing "<" alternating with ">", just show that loop is running. After some time, a number of hours, the right arrow displayed is changed to some other, unknown character.
Can You post a picture showing, in general, what the fysics looks like?

That image shows an LCD that has not been initialised, which if it was working before indicates that the LCD itself has been temporarily disconnected from power.

sketch of the project.

Can't see a 10k pullup on the reset pin, and you have a confusingly labelled "rest_button" which arguably might be better connected to ground using a pull-up.

Is your, secret, code using the String class?

Is your, secret, code using arrays?

Misuse of either can cause that symptom to happen.

Read the forum guidelines to see how to properly post code and some hints on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Could it also happen if the processor was reset by a memory problem caused by Strings or array bounds violations?

You need to add decoupling to power leads.

When request was for "sketch" that means your code.

No, this is the uninitialised condition of the LCD display driver, as if no code had accessed it.

It would - as Bill will vouch - be rather difficult for any software to actually put it into this state. It is the default state when the LCD display driver has just been powered up, so indicates that there has been a loss of power to the LCD.

this is the closest explination beacause when unplugging and replugging the power it somtimes returns to normal and other times not .
any suggesion to solve the power problem ?

thanks again Mr.Paul

Reply #10

How robust are your connections? I hope it is not on solderless bread board. They are notorious for giving you intermittent connections.

its a customized PCB board.