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.62. RSOUTSyntax : RSOUT Item { , Item... }Overview :Operators :Send one or more Items to a predetermined pin at a predeterminedbaud rate in standard asynchronous format using 8 data bits, no parityand 1 stop bit (8N1). The pin is automatically made an output.Item may be a constant, variable, expression, 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 transmitted.The modifiers are listed below: -ModifierAT ypos , xposBIN{1..16}CLSDEC{1..5}HEX{1..4}REP c\nOperationPosition the cursor on the LCDSend binary digitsClear the LCD (also creates a 30ms delay)Send decimal digitsSend hexadecimal digitsSend 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 transmitted.Example :DIM Var as BYTEDIM Wrd as WORDRSOUT CLS, “Hello World”‘ Clear the LCD before displaying textRSOUT “Hello World” ‘ Display the text “Hello World”RSOUT “Var= “, DEC Var ‘ Display the decimal value of VARRSOUT “Var= “, HEX Var ‘ Display the hexadecimal value of VARRSOUT “Var= “, BIN Var ‘ Display the binary value of VARRSOUT “Var= “, @Var ‘ Display the decimal value of VARRSOUT REP “*” \ 10 ‘ Display 10 ‘*’ charactersDeclares : There are four DECLARES for use with RSOUT. These are : -DECLARE RSOUT_PIN PORT . PINAssigns the Port and Pin that will be used to output serial data fromthe RSOUT command. This may be any valid port on the PIC.If the DECLARE is not used in the program, then the default Port andPin is PortB.0.115Copyright Crownhill 2001

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

Saved successfully!

Ooh no, something went wrong!