I just played with this last weekend. This code worked for me (below). I put the total I wanted it to count up to in cell H2 of the active sheet, loaded this code into the BS2, and then ran it through the sheet. Once I got the hang of it, all of the stuff in the help file seemed pretty straightforward. You did look at the help file, right?
=======================
' {$STAMP BS2}
' {$PBASIC 2.5}
Counter1·· VAR· Word
Counter2·· VAR· Word
Total····· VAR· Word
Counter1 = 0
Counter2 = 0
SEROUT 16,84,[noparse][[/noparse]"CELL,GET,H2",CR]
SERIN 16,84,[noparse][[/noparse]DEC Total]
SEROUT 16, 84, [noparse][[/noparse]"LABEL, Time, Timer, Counter1, Counter2", CR]
SEROUT 16, 84, [noparse][[/noparse]"RESETTIMER",CR]
DO · Counter1 = Counter1 + 1 · Counter2 = COS Counter1 · SEROUT 16, 84, [noparse][[/noparse]"DATA, TIME, TIMER,", SDEC Counter1,",",SDEC Counter2,CR] · IF Counter1 = Total THEN EXIT
LOOP
END
Comments
=======================
' {$STAMP BS2}
' {$PBASIC 2.5}
Counter1·· VAR· Word
Counter2·· VAR· Word
Total····· VAR· Word
Counter1 = 0
Counter2 = 0
SEROUT 16,84,[noparse][[/noparse]"CELL,GET,H2",CR]
SERIN 16,84,[noparse][[/noparse]DEC Total]
SEROUT 16, 84, [noparse][[/noparse]"LABEL, Time, Timer, Counter1, Counter2", CR]
SEROUT 16, 84, [noparse][[/noparse]"RESETTIMER",CR]
DO
· Counter1 = Counter1 + 1
· Counter2 = COS Counter1
· SEROUT 16, 84, [noparse][[/noparse]"DATA, TIME, TIMER,", SDEC Counter1,",",SDEC Counter2,CR]
· IF Counter1 = Total THEN EXIT
LOOP
END
Thanks for your help. I'll try your program.
Yes, I tried the HELP, but I must be too dumb to understand it.
Thanks, again.
Bud Klein
If you have any post some specifics.
-Martin Hebel (PLX-DAQ author).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
Keep plugging away and you'll eventually figure it out.