Test I2C ??

I am looking for a simple way to test pins 20 & 21 on my Arduino Mega. These are SDA & SCL respectively. I may have cooked something.

I have a fancy O scope and have tried a couple of things but do not see any change on these pins other that when the board resets.

Is there a way I could make them "busy" for a while? In other words can I toggle each pin on and off at some frequency to see if the output is ok?

Seems like I read somewhere that these pins are also useable as portD io pins. If so would a simple program like "blink" with the port changed work?

Thanks!
Keshka

Yes, just use the Arduino example blink program, just changing the digital pin number used from 13 to 20 and then 21. The pin(s) should toggle and can be verifed either with a DC meter, LED/resistor or O-scope.

For a short test, you could just wire a jumper from pins 20 or 21 to pin 13 and observe the built in LED, as by default pin 13 will be a input and no harm will be done by wiring those pins to 13. The LED should blink just as if pin 13 was outputting.

Lefty

Thanks Ret!
I just tried it and yes, both pins change state. So now I am thinking I killed my RTC. It's a DS1307. It WAS working! Sat on the bench too long and prob got zapped.

Keshka

I sent you a PM with the sketch I use to set and read my RTC using my Seeduino Mega board.

Lefty

Cool! got the little sucker talkin' again.

I feel MUCH better now! lol

TY Lefty