Positron Compiler Documentation

Plot

Positron8 · Revision 4.0.6.5 · PDF pages 272–273

Plot Ypos, Xpos

Set an individual pixel on a graphic LCD.

Xpos can be a constant, variable, or expression, pointing to the X-axis location of the pixel to set. This must be a value of 0 to the X resolution of the LCD. 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 set. This must be a value of 0 to the Y resolution of the LCD. Where 0 is the top column of pixels.

  Device = 16F1829
  Declare LCD_Type = KS0108      ' Use a KS0108 Graphic LCD
'
' Graphic LCD Pin Assignments
'
  Declare LCD_DTPort = PORTD
  Declare LCD_RSPin = PORTC.2
  Declare LCD_RWPin = PORTE.0
  Declare LCD_ENPin = PORTC.5
  Declare LCD_CS1Pin = PORTE.1
  Declare LCD_CS2Pin = PORTE.2

  Dim Xpos as Byte
'
' Draw a line across the LCD
'
  While                         ' Create an infinite loop
     For Xpos = 0 to 127
       Plot 20, Xpos
       DelayMs 10
     Next
     '
     ' Now erase the line
     '
     For Xpos = 0 to 127
       UnPlot 20, Xpos
       DelayMs 10
     Next
  Wend

See also : LCDread, LCDwrite, Pixel, UnPlot. See Print for circuit.

View original PDF page 272Open page in PDFOriginal PDF page 272
Original diagram or table from Positron8, PDF page 273
Original figure / layout · PDF page 273
Text in this figure or table

Graphic LCD pixel configuration for a 128x64 resolution display.

Line 0Line 1Line 2Line 3Line 4Line 5Line 6Line 7
063
127127

Xpos 0 - 127

00
0Ypos 0 - 6363
View original PDF page 273Open page in PDFOriginal PDF page 273