DS 1307 Real time Clock interface with Intel 386EX processor

Jul 08, 2004 5 Replies

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



Thanks learner


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.

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

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

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".

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required