From: Jean-Paul <tch...@fr...> - 2008-07-03 06:04:13
|
Hello Dave, A stupid question: did you check your hardware and confirm that the two I2C physical lines have got pullup resistors? The outputs of I2C devices are open collectors (rather open drains nowadays). The first question in fact: is there some I2C device that actually works in your hardware? Jean-Paul Le Jeudi 3 Juillet 2008 07:54, dave jones a écrit : > Hi Dave, > > I want to read/set RTC date and time with 8051 via the i2c protocol. > I2C implementation protocol I used is > http://sdccokr.dl9sec.de/dld/top03_pac01.zip > Also, I found out there are no ouput voltage with the SDA pin, I > should set SDA = 0. > I guess that i2c implementation I got is wrong? Thanks. > > Dave McGuire wrote: > > On Jul 2, 2008, at 9:49 AM, Gudjon I. Gudjonsson wrote: > >>> Would anyone have an example about how to interface rs5c372a with > >>> 8051 > >>> via i2c protocol? I tried to use > >>> http://sdccokr.dl9sec.de/dld/top03_pac01.zip with no luck. > >>> i2c_write() always failed. The RS5C372A slave address is 0x64. > >>> Thanks in advance. > >>> > >>> rs5c372a datasheet: www.datasheetcatalog.org/datasheets/ > >>> 480/482022_DS.pdf > >> > >> I made the attached library for my applications on the p89c668 > >> microcontroller, but it has worked with all I2C chips I have used. > > > > The P89C66x processors have an on-chip I2C controller. What 8051 > > implementation is the original poster using? > > > > -Dave > > > > -- > > Dave McGuire > > Port Charlotte, FL > > -- Never jump into a loop! |