DS1307; alt. ctrl pins failing
verobel
Posts: 81
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, [noparse][[/noparse]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, [noparse][[/noparse]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
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks, John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
One last question.. for max speed to the LCD what should the second parameter be? (assuming we are connecting BS2pe pin 14 to rx/tx on 2x16 serial LCD)
In my latest circuit/code/experiment I am trying to get a a handle on scan times..how long it takes to perform certain operations (measure temp, read time, read a/d, write LCD), so that in designing applications I will know if speed is an issue... whether a dedicated micro like SX28 would be required to run certain functions in support of BS2pe controller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
·· LCD Commands are for Parallel LCDs only...Yours is serial and does not use the LCD commands.· As for the maximum speed that depends on the LCD.· You did not state which one you were using.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com