Shop OBEX P1 Docs P2 Docs Learn Events
My DS1307 on the PDB work well with a BS2pe but I can't make it to work with a — Parallax Forums

My DS1307 on the PDB work well with a BS2pe but I can't make it to work with a

jmbertoncelli@USAjmbertoncelli@USA Posts: 48
edited 2009-09-07 14:04 in BASIC Stamp
Work just fine with the BS2pe but doesn't with my px24???

some help could be welcome.

thanks

jm.

Here is my code:

' {$STAMP BS2pe}
' {$PBASIC 2.5}
' {$PORT COM14}
#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
··· T1200······ CON···· 813
··· T2400······ CON···· 396
··· T4800······ CON···· 188
··· T9600······ CON···· 84
··· T19K2······ CON···· 32
··· T38K4······ CON···· 6
· #CASE BS2SX, BS2P
··· T1200······ CON···· 2063
··· T2400······ CON···· 1021
··· T4800······ CON···· 500
··· T9600······ CON···· 240
··· T19K2······ CON···· 110
··· T38K4······ CON···· 45
· #CASE BS2PX
··· T1200······ CON···· 3313
··· T2400······ CON···· 1646
··· T4800······ CON···· 813
··· T9600······ CON···· 396
··· T19K2······ CON···· 188
··· T38K4······ CON···· 84
#ENDSELECT
#SELECT $STAMP
· #CASE BS2, BS2E
··· DurAdj····· CON···· $100··················· ' Duration / 1
· #CASE BS2SX
··· DurAdj····· CON···· $280··················· ' Duration / 0.400
· #CASE BS2P, BS2PX
··· DurAdj····· CON···· $37B··················· ' Duration / 0.287
· #CASE BS2PE
··· DurAdj····· CON···· $163··················· ' Duration / 0.720
#ENDSELECT
#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
··· I2CDAT····· PIN···· 0
· #CASE BS2SX, BS2P
· #CASE BS2PX
··· I2CDAT····· PIN···· 8
#ENDSELECT
rtcREGS VAR Byte(10)
#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
· #CASE BS2SX, BS2P
· #CASE BS2PX
· CONFIGPIN DIRECTION,· %0000000000000000
· CONFIGPIN PULLUP,···· %0000000000000000
· CONFIGPIN THRESHOLD,· %0000000000000000
· CONFIGPIN SCHMITT,··· %0000000000000000
#ENDSELECT
I2COUT I2CDAT,$D0,$00,[noparse][[/noparse]%00000001]
I2COUT I2CDAT,$D0,$01,[noparse][[/noparse]%00000000]
I2COUT I2CDAT,$D0,$02,[noparse][[/noparse]%00000110]
I2COUT I2CDAT,$D0,$03,[noparse][[/noparse]$07]
I2COUT I2CDAT,$D0,$04,[noparse][[/noparse]$01]
I2COUT I2CDAT,$D0,$05,[noparse][[/noparse]$01]
I2COUT I2CDAT,$D0,$06,[noparse][[/noparse]$09]
main:
I2CIN I2CDAT,$D0,$00,[noparse][[/noparse]STR rtcREGS\8]
DEBUG CRSRXY, 1, 1,HEX2 rtcREGS(0)
DEBUG CRSRXY, 1, 2,HEX2 rtcREGS(1)
DEBUG CRSRXY, 1, 3,HEX2 rtcREGS(2)
DEBUG CRSRXY, 1, 4,HEX2 rtcREGS(3)
DEBUG CRSRXY, 1, 5,HEX2 rtcREGS(4)
DEBUG CRSRXY, 1, 6,HEX2 rtcREGS(5)
DEBUG CRSRXY, 1, 7,HEX2 rtcREGS(6)
DEBUG CRSRXY, 1, 8,HEX2 rtcREGS(7)
DEBUG CRSRXY, 1, 9,HEX2 rtcREGS(8)
PAUSE 100
GOTO main
STOP

·

Comments

  • HermieHermie Posts: 36
    edited 2009-08-30 18:19
    Not sure if of matters or not but try changing the first line in your code from bs2pe to bs2px
  • jmbertoncelli@USAjmbertoncelli@USA Posts: 48
    edited 2009-08-30 19:14
    I have found what the issue was all about... I have 2 PDBs and found that one DS1307 does not work... I can set the time and I can read the values that have been set but the RTC does not start... The code is OK and work perfectly well with all of my BS2s. I am wondering if I could send the PDB back to Parallax for repair?
    Thanks for your help.
    jm.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-09-04 21:16
    If the DS1307 does not function you can send it in for repairs. Just contact our Tech Support dept to make the arrangements. support@parallax.com

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2009-09-05 00:25
    Did you try removing and reinstalling the backup battery.

    A shot in the dark but maybe the DS1307 memory is corrupted...
  • jmbertoncelli@USAjmbertoncelli@USA Posts: 48
    edited 2009-09-07 14:04
    Of course.

    thanks anyway for the idea.

    jm.
Sign In or Register to comment.