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.46. PIXEL “NOT AVAILABLE IN THE <strong>LITE</strong> VERSION”.Syntax :Overview :Operators :Example :Variable = PIXEL Ypos , XposRead the condition of an individual pixel on a 64x128 element graphicLCD. The returned value will be 1 if the pixel is set, and 0 if the pixelis clear.Variable is a user defined variable.Xpos can be a constant, variable, or expression, pointing to the X-axis location of the pixel to examine. This must be a value of 0 to 127.Where 0 is the far left row of pixels.Ypos can be a constant, variable, or expression, pointing to the Y-axis location of the pixel to examine. This must be a value of 0 to 63.Where 0 is the top column of pixels.DEVICE 16F877DECLARE LCD_TYPE GRAPHIC ' Use a Graphic LCDDECLARE INTERNAL_FONT OFF ‘ Use an external chr setDECLARE FONT_ADDR 0 ‘ Eeprom’s address is 0' Graphic LCD Pin AssignmentsDECLARE LCD_DTPORT PORTDDECLARE LCD_RSPIN PORTC.2DECLARE LCD_RWPIN PORTE.0DECLARE LCD_ENPIN PORTC.5DECLARE LCD_CS1PIN PORTE.1DECLARE LCD_CS2PIN PORTE.2' Character set eeprom Pin AssignmentsDECLARE SDA_PIN PORTC.4DECLARE SCL_PIN PORTC.3DIM Xpos as BYTEDIM Ypos as BYTEDIM Result as BYTECLSPRINT AT 0 , 0 , “TESTING 1-2-3”‘ Read the top row and display the resultFOR Xpos = 0 TO 127Result = PIXEL 0 , Xpos ‘ Read the top rowPRINT AT 1 , 0 , @ResultDELAYMS 400NEXTSTOPSee also :LCDREAD, LCDWRITE, PLOT, UNPLOT. See PRINT for circuit.88Copyright Crownhill 2001

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

Saved successfully!

Ooh no, something went wrong!