Re: [bascom] DS1307 Real Time Clock and I2C with Bascom


From "Wong Sy Ming" <simingx@yahoo.com>
Date Sat, 16 Jun 2001 20:23:40 +0800

Hi, I have got the DS1307 working properly, you *cannot* use the I2CSend and
I2CReceive commands, you have to use discrete I2CStart, I2CWbyte etc.

Actually you cannot use the I2CSend, I2Creceive commands for anything more
advanced than a PCF8574, because they need you to send more than one byte at
a time.

Here is a program to get you started. I have to thank Lynndon Harnell for
providing it.

I have another program which allows you to use pushbutton switches to set
the time, but you cannot set the date because of the code size being >2048
bytes (inefficient programming?? :) but I do not have it right now, email me
if you need it.

Also, 10k pullups will do just fine for the I2C-bus.



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com