noob help Arduino freezes accessing RTC when LCD shield is installed

Ok brand new to Arduino. I hook up a DS1307RTC direct to arduino and run the example DS1307RTC settime and read time sketches and they work fine. (I am using these to rule out issues with my own sketch) I install a SainSmart Keypad Shield 1602 LCD Module and the arduino freezes. it appears to freeze on any call to twi.c that has a wait for TWI to become ready.

example in twi_writeTo()
while(TWI_READY != twi_state)
{
continue;
}

twi_state never goes to ready.

I read all the documentation I could find on the LCD/Keypad and it does not use any i2c functionality and used A0 for the keypad and digital pins for all else.

any help appreciated.

Try measuring the voltage between the GND and 5V pins once without the LCD module and once with the module installed. My guess is that in the second case the voltage is significantly below 5V. If the voltage drops the DS1307 goes into a no-communication state, if it drops further it changes to battery backup.

Have you tried to run it with an external power supply?

measured voltage with LCD shield and have 5.09VDC. Tried with external power supply and get same same. Freezes first time twi_writeTo is called as it waits for I2c bus to become ready but bus never becomes ready.

Oh and RTC is Tiny RTC I2c module if that helps at all. Could not find a schematic on.

Post the sketch you're experimenting with. Are you calling the wire.c functions directly?

it appears to freeze on any call to twi.c that has a wait for TWI to become ready.

I assume that you when you are having problems you are making your RTC connections to the I2C pins on the LCD shield. I would investigate the connections between the Arduino and the shield and make sure that there is continuity.

Oh and RTC is Tiny RTC I2c module if that helps at all. Could not find a schematic on.

You can find a link to a schematic here: --> Real Time Clock Module | Hobbyist.co.nz

Don