DS 1307 Real time Clock interface with Intel 386EX processor

Is it possible to hook pins SCL,SDA of Dallas DS1307 RTC with I/O ports of Intel 386EX processor?

Thanks learner

Reply to
learner
Loading thread data ...

I don't think there's any hardware reason why you couldn't do that and drive the I2C protocol via pure software. I assume you mean regular digital I/O pins and not to anything like a UART.

Reply to
Gary Kato

I am using parallel I/O ports available in the processor. Do I need pullup resistors to hook SCl and SDA to processor? I am new to this field and any help will be appreciated.

Thanks

Reply to
learner

What might be a problem is the open-drain nature (wire-and) of the I2C bus. On many I/O ports, you'll need three-state buffers and send the data via the output enable pin to simulate an open-drain device.

If the output bits are easily individually controlled as inputs or outputs, the same effect can be created using the data direction register as the outputs and pre-set the output register bits to zeroes.

You have to create the bus sequences bit by bit in software.

HTH

Tauno Voipio tauno voipio @ iki fi

Reply to
Tauno Voipio

I'm not a hardware guy but it looks like you do need pullup resistors on both lines. You might try getting a book like "Designing Embedded Hardware".

Reply to
Gary Kato

In article , Gary Kato writes

SCL and SDA lines do need pullups, stick a 4K7 up to the positive supply on each one. Even if the processor already has pullups it won't do any harm

--
Tim Mitchell
Reply to
Tim Mitchell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.