BS1 code to send calculator managed data to display issues
Buck Rogers
Posts: 2,187
in BASIC Stamp
Hello!
Okay, I've managed to write out code which makes of original code ideas to make use of a TI 83Plus calculator:
Now attempting to send the program with those changes made causes an error. It thinks there's a need for variables with that one. Would someone confirm that one? (No need to try to run it.)
Okay, I've managed to write out code which makes of original code ideas to make use of a TI 83Plus calculator:
' {$STAMP BS1} ' {$PBASIC 1.0} SYMBOL serData = B2 ' -----[ I/O Definitions ]------------------------------------------------- SYMBOL TX = 0 ' serial output to LCD ' -----[ Constants ]------------------------------------------------------- SYMBOL LcdBkSpc = $08 ' move cursor left SYMBOL LcdRt = $09 ' move cursor right SYMBOL LcdLF = $0A ' move cursor down 1 line SYMBOL LcdCls = $0C ' clear LCD (use PAUSE 5 after) SYMBOL LcdCR = $0D ' move pos 0 of next line SYMBOL LcdBLon = $11 ' turn backlight on SYMBOL LcdBLoff = $12 ' turn backlight off SYMBOL LcdOff = $15 ' LCD off SYMBOL LcdOn1 = $16 ' LCD on; cursor off, blink off SYMBOL LcdOn2 = $17 ' LCD on; cursor off, blink on SYMBOL LcdOn3 = $18 ' LCD on; cursor on, blink off SYMBOL LcdOn4 = $19 ' LCD on; cursor on, blink on SYMBOL LcdLine1 = $80 ' move to line 1, column 0 SYMBOL LcdLine2 = $94 ' move to line 2, column 0 Reset: HIGH TX ' setup serial output pin PAUSE 100 ' allow LCD to initialize Main: SEROUT TX, T2400, (LcdBLoff, LcdOn1) PAUSE 250 'DEBUG serData SERIN 7, T2400, serData 'DEBUG serData serData = serData + 1 'DEBUG serDATA SEROUT 7, T2400, (serData) SEROUT TX,T2400, (#serData) 'SEROUT TX,T2400, (#serData, CR) 'PAUSE 500 'DEBUG serDATA 'SEROUT TX, T2400, (LcdCls) GOTO MainThat code unchanged runs properly. But by switching the comments for the two output lines:
'SEROUT TX,T2400, (#serData) SEROUT TX,T2400, (#serData, CR)
Now attempting to send the program with those changes made causes an error. It thinks there's a need for variables with that one. Would someone confirm that one? (No need to try to run it.)
Comments
SYMBOL CR = 13
Now it gets baroque. I'm now getting "Error:241-Symbol name invalid or already defined."
SEROUT TX,T2400, (#serData, CR)
I did manage earlier today to translate it into a BS2 program that does work and display data properly, so that's a solved problem there.
Thanks Mike.
Win one, lose one I guess.