Hi John,
Both configurations have 4.7K pullups for the clock and data lines.
ATMega16 pin-22 to DS1307 pin-6 (SCL)
ATMega16 pin-23 to DS1307 pin-5 (SDA)
ATMega128 pin-25 to DS1307 pin-6 (SCL)
ATMega128 pin-26 to DS1307 pin-5 (SDA)
I am using a separate breadboard for the DS1307. This board has the
pullups, battery, and crystal.
I know that the hardware works (as this works correctly with the
ATMega128).
I am using TWI.C /TWI.H
GCC version: WinAVR-20080610
Both Processors are running at 8MHz.
When I look at the signal with my logic analyzer, I see that the
ATMega128 is working [The ATMega16 is not].
The ATMega16 is functional (as it runs other software correctly).
So... the software should not change when going from the ATMega128 to
the ATMega16?
I'm going to look into this more (now that I'm home from work). The
mad hobby guy can't be stopped!
Thanks for your input, John.
Cheers.
David
--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
Show quoted textHide quoted text
>
> At 02:51 PM 5/01/2009, you wrote:
> >I have code running on my ATMega128. The software is TWI/I2C (talking
> >to a DS1307). When I compile it for my ATMega16, it gets stuck in
> >the following file:
>
> How are the 2 modules wired up? ie pull-up resistors for the I2C etc.
>
> Regards
>
> John Samperi
>
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495 Fax (02) 9674-8745
> Website http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>