verobel
05-19-2006, 08:10 AM
Fellow Stampers..
I am working with the BS2pe and the DS1307 RTC on the Prof.Dev.Board.· I use code like:
·...
·GOSUB Get_Clock
·Get_Clock:
· I2CIN SDA, DS1307, 0, [STR secs\7]······ ' read secs->year
· hrs = hrs & $3F·························· ' mask unused bits
· DEBUG CRSRXY, 0, 2,
· HEX2 hrs, ":", HEX2 mins, ":", HEX2 secs, " ict:", DEC3 ict
· RETURN
in 2 separate program. In the first I have SDA=PIN0, SCL=PIN1 and it works ok. In the second I have SDA=PIN7, SCL=PIN8 and it doesn't work. I have tested·to see if the pins 7 & 8 are working using code below.. .
start:
·OUTPUT 7
·OUTPUT 8
·PAUSE 2000
·TOGGLE 7
·TOGGLE 8
·GOTO start
they look ok..led's toggle on/off
What is wrong with using different pin assignment for the DS1307 clock?
Thanks..in advance, John
I am working with the BS2pe and the DS1307 RTC on the Prof.Dev.Board.· I use code like:
·...
·GOSUB Get_Clock
·Get_Clock:
· I2CIN SDA, DS1307, 0, [STR secs\7]······ ' read secs->year
· hrs = hrs & $3F·························· ' mask unused bits
· DEBUG CRSRXY, 0, 2,
· HEX2 hrs, ":", HEX2 mins, ":", HEX2 secs, " ict:", DEC3 ict
· RETURN
in 2 separate program. In the first I have SDA=PIN0, SCL=PIN1 and it works ok. In the second I have SDA=PIN7, SCL=PIN8 and it doesn't work. I have tested·to see if the pins 7 & 8 are working using code below.. .
start:
·OUTPUT 7
·OUTPUT 8
·PAUSE 2000
·TOGGLE 7
·TOGGLE 8
·GOTO start
they look ok..led's toggle on/off
What is wrong with using different pin assignment for the DS1307 clock?
Thanks..in advance, John