I2C does not work after RESET but after "Coldstart"

Hi,

maybe it's not the right branche, so please put to the right branche :slight_smile:

I'm programing some king of Controller for my SSPA mainly driven by ARDUINO PROJECTS: LDMOS Solid state PA control

So whats the problem:

I've attached an pcf8574 to 4x20 LCD using #include <LiquidCrystal_I2C.h> and an other pcf8574 using #include <PCF8574.h>.

After a cold start everything works fine, but after Reset for expamle by user Interface

        wdt_enable(WDTO_15MS);
        while (1);
        break;

or an upload via ISP > Arduino hangs at I2C

 lcd.begin(nColumns,nRows);

But I can't figure out why it's stopping here.
MAybe becase LCD is already init?

Any suggestions?
Frank

Perhaps the LCD display or the pcf chip are left in some unexpected state when the arduino is reset.

The normal way to avoid that is to connect the reset lines together so that when the Arduino is reset, the other devices are also reset. Unfortunately, neither the LCD or the pcf chip have a reset pin.

Perhaps the LCD and the pcf chip could be powered directly from an Arduino digital pin. I do not think either would draw much current from the Arduino pin, provided that the LCD backlight is not powered that way. If so, power could be provided to the Vdd pin of the LCD and the Vcc pin of the pcf chip by setting a digital pin to OUTPUT/HIGH during setup(). When the Arduino is reset, this would cut the power to the LCD and pcf chip and reset them also. The A & K pins of the LCD should be connected directly to 5V & GND, not to this arduino pin, because the backlight would draw too much current and damage the arduino pin.

Thank you, but PCB is already done and running...and unfortunlay no PINS are left.

But I looks like the Ardunio ist restarting again and again...because "greatings message" is repeatet all the time and stops over at Dispaly init. Looks like watchdog ist not reset / disabled correctly.

Okay Problem solved!!

MCUSR = 0; 
wdt_disable();

If not cleard, watchdog is running and not disabled.

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