Bs2 why does this give error
SPENCE
Posts: 204
I GET ERROR MESSAGE SYMBOL ALREADY DEFINED.
THE ERROR OCCUS IF I HAVE THE ENTIRE PROGRAM LOADED OF JUST THE FOLLOWING PART.
' LCD16x2.BS2
' PROGRAM MESSAGE ON LCD MODULE 16 X 2
' This program demonstrates initialization and printing on a 2 x 16
' character LCD display.
'FROM STAMP WORKS PAGE 67
' {$STAMP BS2}
' {$PBASIC 2.5}
e CON 0 'LCD ENABLE PIN (1 = ENABLED)
RS CON 3 'REGISTER SELECT (1 - CHAR)
LCDOUT VAR OUTB '4-BIT LCD DATA
CLRLCD CON $01 'CLEAR THE LCD
CrsrHm CON $02 'MOVE CURSOR TO HOME POSITION
CRSRLF CON $10 'MOVE CURSOR LEFT THIS LINE GIVES ERROR
CRSRRT CON $14 'MOVE CURSOR RIGHT
DISPLF CON $18 'SHIFT DISPLAYED CHARACTERS LEFT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
73
SPENCE
K4KEP
THE ERROR OCCUS IF I HAVE THE ENTIRE PROGRAM LOADED OF JUST THE FOLLOWING PART.
' LCD16x2.BS2
' PROGRAM MESSAGE ON LCD MODULE 16 X 2
' This program demonstrates initialization and printing on a 2 x 16
' character LCD display.
'FROM STAMP WORKS PAGE 67
' {$STAMP BS2}
' {$PBASIC 2.5}
e CON 0 'LCD ENABLE PIN (1 = ENABLED)
RS CON 3 'REGISTER SELECT (1 - CHAR)
LCDOUT VAR OUTB '4-BIT LCD DATA
CLRLCD CON $01 'CLEAR THE LCD
CrsrHm CON $02 'MOVE CURSOR TO HOME POSITION
CRSRLF CON $10 'MOVE CURSOR LEFT THIS LINE GIVES ERROR
CRSRRT CON $14 'MOVE CURSOR RIGHT
DISPLF CON $18 'SHIFT DISPLAYED CHARACTERS LEFT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
73
SPENCE
K4KEP
Comments
·· The CRSRLF and the following CRSRRT are reserved words for the BASIC Stamp (Used by DEBUG)· you will need to change these to something else.· Also, LCDOUT is a keyword on the BS2p series BASIC Stamps, and thus shouldn't be used either.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
don't know what has happened but all distributions by email have stoped. Maybe outgoing mail server is dead.
This part of the program above is directly verbatim out of the book. Why the conflict?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
73
spence
k4kep
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Is the syntax correct in this declaration?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax