[En-Nut-Discussion] TWI aka I2C, not getting an ACK back? - SOLVED

Alexander Baranov baranov at intech21.com
Thu Mar 17 14:48:57 CET 2005


I'd recommend 4.7k rather than 2.2k.
Alexander
----- Original Message ----- 
From: "Douglas Pearless" <Douglas.Pearless at pearless.co.nz>
To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
Sent: Thursday, March 17, 2005 4:16 AM
Subject: Re: [En-Nut-Discussion] TWI aka I2C, not getting an ACK back? -
SOLVED


> Hi Harald,
>
> Thanks for the assistance.
>
> It turned out that the TwMasterTransact routine, when you pass the
> address of an array for the transmit buffer, it starts the 'read' from
> the data[1] not data[0], so it was skipping the register address of the
> DS1337 which was in the zeroth position (data[0])
>
> When I figured that out, and corected my code, it then worked perfectly!
>
> Rather bizzare, but then I am no C expert!
>
> Cheers DOuglas
>
> Douglas Pearless wrote:
>
> > There are only two 2k2 pull ups on SDA and SCK to +5v and the DS1337.
> > There are no other wires or connections!
> >
> > Cheers Douglas
> >
> > Harald Kipp wrote:
> >
> >> Hi Douglas,
> >>
> >> At 16:30 16.03.2005 +1300, you wrote:
> >>
> >>>    rc = writeRTC(sla,0x0E,dataRTC,2); //on the i2c bus I get
> >>> "<start> 110100000 <SDA goes high>  000000000  000000000
> >>> 000000000<stop>
> >>> //where did the 0x0E go which should have been immediately after
> >>> <SDA goes high>
> >>> //I checked the wrteRTC routine and it does pass 0x0E 0x00 0x00 in
> >>> the 'data field to TwMasterTransact
> >>
> >>
> >>
> >> What about hardware? You are aware, that I2C is open
> >> drain? Did you add pull-ups? Anything else connected,
> >> which may drive the bus low?
> >>
> >> Harald
> >>
> >> _______________________________________________
> >> En-Nut-Discussion mailing list
> >> En-Nut-Discussion at egnite.de
> >> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >>
> > _______________________________________________
> > En-Nut-Discussion mailing list
> > En-Nut-Discussion at egnite.de
> > http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>





More information about the En-Nut-Discussion mailing list