is sprintf incompatible with I2C LCD?

I have a clock program I thought it worked well until I hard mounted everything. now that I can leave it running I have endless problems with corrupted or locked up displays. It runs about 36 hours, then locks up or shows random characters.

the displays that lock up are driven with sprintf. sometimes the backlight turns off. I was using 2 16X2s. I moved those functions to one 20X4. same results

The cable is about 3 feet long. 4.7 K pullup resistors at the terminal board on the 5 display panel, in common with all displays. I have an I2C buffer module coming.

Is this related to sprintf, or just a coincidence?

somebody is going to say publish the program. It's 9 k. it uses a particular library and a particular I2C backpack. if I post it, one of our perennial fault finders will jump in. so, no, thank you.

Is this related to sprintf, or just a coincidence?

Unlikely. If it was it wouldn't work at all.

Are you using Strings (capital S)? What you describe is the kind of random problem Strings cause. Also static damage will cause random problems.

Do you know if the program is stopping when the display freezes? Do you have a run LED?

Do you have decoupling capacitors all over the place?

Try lower value resistors, maybe 2k or something.

Photos please.

blabla. If you don't want to show your 9k code, make 10 liner showing the problem.

@Geek Emeritus

No code, No pics, No schematics, That doesn't really help anyone to help you.

Best guess is the 3 foot cable introducing spurious noise factors from local devices.

My next guess is that the red wire is upside down :grin:

So by "perennial fault finders", you mean the people who understand what the problem is likely to be? Tough! :roll_eyes:

If you used a (capital "S") String, then that is the fault. :grinning:

no capital s string

if you leave serial monitor running, you can see the clock updating. it's a display problem.

the red wire can't be the problem. I'm using circular polarized DC

Ah a display we cannot see using code we cannot see built using a schematic we cannot see.

My serial monitor updates just fine as does my display but then again I cannot tell you what I am doing to get such fine results.

C'mon you know better than this !
Either add some details as requested or I will just throw this in the shark tank and have done with it.

is sprintf incompatible with I2C LCD?

That question is easily answered

sprintf is not incompatible with I2C LCD

However your use of sprintf() (which we have not seen) and/or your use and connection of the I2C LCD (which we have not seen) may be incompatible or more likely just plain wrong

[quote author=Geek Emeritus link=msg=4739062 date=1600210663]
The red wire can't be the problem. I'm using circular polarized DC[/quote]
In my experience when you use circular polarised DC you have to be careful to get the polarity of the neutron flow the right way, try reversing it.

Set the clock speed of I2C lower. Use lower value resistors.

Beyond that without all the information you know you need to provide it's impossible to help.

PerryBebbington:
In my experience when you use circular polarised DC you have to be careful to get the polarity of the neutron flow the right way, try reversing it.

But there is the question! Should you cross the streams, or should you not cross the streams?