11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.50. PRINTSyntax : PRINT Item { , Item... }Overview :Operators :Send Text to an LCD module using the Hitachi 44780 controller or agraphic LCD based on the Samsung S6B0108 chipset.Item may be a constant, variable, expression, modifier, or string list.There are no operators as such, instead there are modifiers. For example,if an at sign ‘@’ precedes an Item, the ASCII representationfor each digit is sent to the LCD.The modifiers are listed below: -ModifierOperationAT ypos (1 to n),xpos(1 to n) Position the cursor on the LCDBIN{1..16}Send binary digitsCLSClear the LCD (also creates a 30ms delay)DEC{1..5}Send decimal digitsHEX{1..4}Send hexadecimal digitsREP c\nSend character c repeated n timesThe numbers after the BIN, DEC, and HEX modifiers are optional. Ifthey are omitted, then the default is all the digits that make up thevalue will be displayed.The Xpos and Ypos values in the AT modifier both start at 1. For example,to place the text “HELLO WORLD” on line 1, position 1, thecode would be: -PRINT AT 1 , 1 , “HELLO WORLD”Example :DIM Var as BYTEDIM Wrd as WORDPRINT “Hello World”PRINT “Var= “ , DEC VarPRINT “Var= “ , HEX VarPRINT “Var= “ , BIN VarPRINT “Var= “ , @Var‘ Display the text “Hello World”‘ Display the decimal value of VAR‘ Display the hexadecimal value of VAR‘ Display the binary value of VAR‘ Display the decimal value of VARDeclares :There are six DECLARES for use with an alphanumeric LCD andPRINT: -DECLARE LCD_TYPE 1 or 0 , GRAPHIC or ALPHAInform the compiler as to the type of LCD that the PRINT commandwill output to. If GRAPHIC or 1 is chosen then any output by thePRINT command will be directed to a graphic LCD based on the93Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!