Shop OBEX P1 Docs P2 Docs Learn Events
BS2p40 — Parallax Forums

BS2p40

argmafiaargmafia Posts: 30
edited 2006-03-15 00:01 in BASIC Stamp
Is this their a fairly inexpensive carrier board that I can use to program my BS2p40?

Comments

  • argmafiaargmafia Posts: 30
    edited 2006-03-11 22:28
    I had a BS2e and I changed it to a BS2p40, I had the Pocket Watch B running from the BS2e just fine, and when I hooked it up to the BS2p40 the time displayed on the LCD is 0:00:00. Here is the code, is there something I need to change?

    '
    [noparse][[/noparse] Set the Time ]
    ' To set time, change the values to current time, then run program
    ' [noparse][[/noparse]$55,$00,ss,mm,hh,dd,mo,yl,yh]

    SEROUT ToPWB,PWBBaud,[noparse][[/noparse]$55,$00,00,45,08,8,3,05,20]


    main:

    'Get time from PWB:
    SEROUT ToPWB, PWBBaud, [noparse][[/noparse]$55,$12] 'send request for time
    SERIN FromPWB, PWBBaud, 100, nodat, [noparse][[/noparse]ss,mm,hh,dd,mo,yl,yh] 'populate variables with response from PWB

    nodat:

    ' Check AM/PM & set flag
    IF HH>12 THEN
    HH=HH-12: PM=1
    ELSE
    PM=0
    ENDIF

    ' Write time to line 1 of the LCD
    SEROUT TX, LCDBaud, [noparse][[/noparse]LcdLine2]
    SEROUT TX, LCDBaud, [noparse][[/noparse]" ",DEC hh,":",DEC2 mm,":",DEC2 ss]

    IF PM=1 THEN 'If PM var set then DONT print AM
    SEROUT TX, LCDBaud, [noparse][[/noparse]" pm "]
    ELSE
    SEROUT TX, LCDBaud, [noparse][[/noparse]" am "]
    ENDIF
  • argmafiaargmafia Posts: 30
    edited 2006-03-11 22:38
    does it have to do with the baud rate??
  • argmafiaargmafia Posts: 30
    edited 2006-03-11 22:49
    Nevermind... I found it... but on the BS2p40 how do you designate auxilary I/O's, for example on the regular port you set
    HIGH 0 for P0, how would you do it for X0 for the BS2p40
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-03-12 00:47
    Well, it is all around the BS2p40. The baud rate question already solved. To access x0 to x16, preface the command with AUXIO, or, IOTERM 1:

    HIGH 0 ' main pin p0
    AUXIO
    TOGGLE 0 ' aux pin x0
    MAINIO
    LOW 0 ' main again
    x = 1
    IOTERM x ' aux
    TOGGLE 0

    This is all explained in the manual and also in the help facility included with the STAMPW program.

    I don't know about the carrier board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • argmafiaargmafia Posts: 30
    edited 2006-03-13 21:47
    I have another question... when checking the syntax on my code I get a message saying "EEPROM full", I was told there are different slots of memory, how do I go about using those slots?
  • argmafiaargmafia Posts: 30
    edited 2006-03-13 23:09
    I got it.... now I have a question about the Pocket Watch B. I was wondeing if there is a way to set the time on an LCD using the PWB without it reseting everytime we turn it off? Thanx!!!
  • argmafiaargmafia Posts: 30
    edited 2006-03-15 00:01
    if i am trying to run a stepper motor at four different times using the PWB, how would you set the program up, I can turn it at one time, but when i try turning it at three different times, it doesnt turn
Sign In or Register to comment.