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]
'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
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
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?
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!!!
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
Comments
'
[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
HIGH 0 for P0, how would you do it for X0 for the BS2p40
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