Positron Compiler Documentation

UnPlot

Source: Positron16 Compiler User Manual, PDF page 301

Syntax

UnPlot Ypos, Xpos

Overview

Clear an individual pixel on a graphic LCD.

Parameters

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

Example

  Device = 24HJ128GP502
                                     ' Select the device to compile for
  Declare Xtal = 16
'
' KS0108 graphic LCD declares
'
  Declare LCD_Type = KS0108
                                     ' Setup for a KS0108 graphic LCD
  Declare LCD_DTPort = PORTB.Byte0
  Declare LCD_CS1Pin = PORTB.8
  Declare LCD_CS2Pin = PORTB.9
  Declare LCD_ENPin = PORTB.10
  Declare LCD_RSPin = PORTB.11
  Declare LCD_RWPin = PORTB.12
  Dim Xpos as Byte
  Cls
                                        ' Clear the LCD
'
' 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, Plot. See Print for circuit.