• Pic® Basic


  • Using the Amicus18 ILI9320 Colour Graphic LCD Shield with Proton

    Graphic LCDs are excellent items for presenting informaton, and standard monochrome types serve their purpose well, however adding colour to a project can lift its appeal, and allows a new dimension to any project. The ILI9320 240 x 320 pixel colour graphic LCD is as close to an industry standard as it gets, and allows thousands of colours to be displayed.

    The Amicus18 Colour Graphic LCD shield uses the ILI9320 module, along with a touchscreen interface and an SD card.

    The Proton BASIC compiler supports two graphic LCD chipsets by default, these are the Toshiba T6963, and the Samsung KS0108. The macro library adds support for the ILI9320 240x320 colour graphic LCD, and also adds extra commands for touch screen support. These include:

    Glcd_Init Initialise the graphic LCD
    Glcd_Cls Clear the LCD with a specific colour
    Glcd_PenColor Alter the colour of the pixel to be drawn
    Glcd_Plot Place a pixel on the LCD
    Glcd_Pixel Read a pixel’s condition
    Glcd_Line Draw a line
    Glcd_LineTo Draw a line from the previous ending location
    Glcd_Vline Draw a vertical line
    Glcd_Hline Draw a horizontal line
    Glcd_Circle Draw a circle
    Glcd_Box Draw a square
    Glcd_Rectangle Draw a rectangle
    Glcd_Cursor Move the text cursor
    Glcd_PaperColor Alter the colour of the background of the text
    Glcd_SetFont Choose the character font to print with
    Glcd_Print Display ASCII text on the LCD at the current cursor location
    Glcd_PrintAt Display ASCII text at a pre-determined cursor location
    Touch_Active Detect a stylus on the graphic LCD
    Touch_Get Get the X and Y positions of the stylus on the graphic LCD
    The circuit for the LCD section of the Colour Graphic LCD shield is shown below:






















    Click here for a larger image of the circuit



    Notice the use of a Texas Instruments TPS61040, which is a dedicated voltage boost chip for LED backlight illumination.

    The circuit for the touchscreen interface section of the shield is shown below:






















    Click here for a larger image of the circuit



    The circuit for the SD card section of the shield is shown below:






















    Click here for a larger image of the circuit



    The datasheet for the ILI9320 colour graphic LCD controller can be downloaded from here: ILI9320.pdf
    The datasheet for the TPS61040 voltage boost chip can be downloaded from here: TPS61040.pdf
    The data sheet for the ADS7846 touchscreen controller can be downloaded from here: ADS7846.pdf

    ILI9320 Graphic LCD library macro's overview
    Adding the functionality of the macro’s is as simple as including it into the program via the Include directive:

    Include "ILI9320.inc" ' Load the ILI9320 graphic LCD macros into the program

    Because the ILI9320 chipset is used in a multitude of graphic LCD displays, there is not a pre-determined pin order, therefore a series of $defines allows a particular display to be tailored to meet the program’s requirements. These are:

    Connection to the LCD’s CS pin:

    $define GLCD_CS Port.Bit

    Connection to the LCD’s RS pin:

    $define GLCD_RS Port.Bit

    Connection to the LCD’s WR pin:

    $define GLCD_WR Port.Bit

    Connection to the LCD’s RD pin:

    $define GLCD_RD Port.Bit

    Connection to the LCD’s data port:

    $define GLCD_Data Port

    An optional Connection to the LCD’s Reset pin:

    $define GLCD_RST Port.Bit

    Note.
    If the defines are used, they must be placed before the macros are included into the program. However, the ILI9320.inc file has the defines already setup for the Colour Graphic LCD shield:
    Code:
     $define GLCD_CS    PORTC.2   ' LCD's CS pin
     $define GLCD_RS    PORTC.1   ' LCD's RS pin
     $define GLCD_WR    PORTC.3   ' LCD's WR pin
     $define GLCD_RD    PORTC.5   ' LCD's RD pin
     $define GLCD_Data  PORTB     ' LCD's data port
     $define GLCD_RST   PORTC.4   ' LCD's Reset pin
    
     Include "ILI9320.inc"        ' Load the ILI9320 graphic LCD macros into the program
    Glcd_Init()

    Initialise the ILI9320 graphic LCD.

    Note.
    The LCD is automatically initialised when the ILI9320.inc file is included into the program.

    Glcd_Cls

    Glcd_Cls(pColour)

    Clear the graphic LCD’s screen.

    Operator.
    • pColour: The colour of the screen, which can be a value from 0 to 65535 in RGB565 format, see Glcd_PenColour for details.
    Example.
    Code:
      Include "Amicus18.inc"          ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"           ' Load the ILI9320 graphic LCD macros into the program
    
      Glcd_Cls(clWhite)               ' Clear the LCD’s screen with the colour white
      Glcd_SetFont(Courier_14)        ' Choose the font required
      Glcd_PenColor(clBlack)          ' Change the colour of the text to black
      Glcd_PaperColour(clBrightBlue)  ' Change the colour of the text's background
      Glcd_Cursor(0, 0)               ' Move to the initial position on the LCD
      Glcd_Print("Hello World")       ' Display some text
      Stop
    '-----------------------------------------------------------
    ' Load the font into the program
    '
      Include "Courier_14.inc"
    Note.
    This should be issued before any of the following macros are used.

    The colour value can be any of 65536 values. i.e. 16-bit colour. Its arrangement is known as RGB565, where each colour element is signified by a group of bits. See http://en.wikipedia.org/wiki/RGB_color_model

    Glcd_PenColour

    Glcd_PenColour(pColour)

    Choose the colour of the pixel.

    Operator.
    • pColour: The colour of the pixel, which can be a value from 0 to 65535 in RGB565 format.

    Example.
    Code:
      Include "Amicus18.inc"       ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"        ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bXpos as Byte            ' Create a byte sized variable for the X position 
      Dim wYpos as Word            ' Create a word sized variable for the Y position
    
      Glcd_Cls(clWhite)            ' Clear the LCD's screen with the colour white
      Glcd_PenColor(clRed)         ' Change the colour of the pixel to red
      For wYpos = 0 to 319         ' Form a loop for the Y position
        For bXpos = 0 to 239       ' Form a loop for the X position
          Glcd_Plot(bXpos, wYpos)  ' Set a pixel at the current Xpos and Ypos
          DelayMs 5                ' Slow things down so we can see the pixel being drawn
        Next                       ' Close the X position loop
      Next                         ' Close the Y position loop
    Note.
    The colour value can be any of 65536 values. i.e. 16-bit colour. Its arrangement is known as RGB565, where each colour element is signified by a group of bits. See http://en.wikipedia.org/wiki/RGB_color_model
    For our American friends, the macro library also recognises the text Glcd_PenColor.

    Glcd_Plot

    Glcd_Plot
    (pXpos , pYpos)

    Alter a pixel on the graphic LCD using the current pixel colour.

    Operators.
    • pXpos: X position of the pixel (0 to 239)
    • pYpos: Y position of the pixel (0 to 319)
    Example.
    Code:
      Include "Amicus18.inc"       ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"        ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bXpos as Byte            ' Create a byte sized variable for the X position 
      Dim wYpos as Word            ' Create a word sized variable for the Y position
    
      Glcd_Cls(clWhite)            ' Clear the LCD's screen with the colour white
      Glcd_PenColor(clRed)         ' Change the colour of the pixel to red
      For wYpos = 0 to 319         ' Form a loop for the Y position
        For bXpos = 0 to 239       ' Form a loop for the X position
          Glcd_Plot(bXpos, wYpos)  ' Set a pixel at the current Xpos and Ypos
          DelayMs 5                ' Slow things down so we can see the pixel being drawn
        Next                       ' Close the X position loop
      Next                         ' Close the Y position loop
    Note.
    The colour value can be any of 65536 values. i.e. 16-bit colour. Its arrangement is known as RGB565, where each colour element is signified by a group of bits. See http://en.wikipedia.org/wiki/RGB_color_model

    Glcd_Pixel

    Var = Glcd_Pixel(pXpos, pYpos)

    Read a pixel from the LCD’s screen.

    Operators.
    • pXpos: X position of the pixel (0 to 239)
    • pYpos: Y position of the pixel (0 to 319)
    • Var: Can be a variable of type; Bit, Byte, Word, Dword, or an array.
    Example.
    Code:
      Include "Amicus18.inc"           ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"            ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bXpos as Byte                ' Create a byte sized variable for the X position 
      Dim wColour as Word              ' Create a word sized variable to hold the pixel colour
    
      Glcd_Cls(clWhite)                ' Clear the LCD's screen with the colour white
    
      For bXpos = 0 to 239 Step 8      ' Form a loop for the X pos with an increment of 8
        Glcd_PenColor(clRed)           ' Change the colour of the pixel to red
        Glcd_Plot(bXpos, 0)            ' Set a pixel at the current Xpos
      Next                             ' Close the X position loop
    '
    ' Read the pixels and re-display
    '
      For bXpos = 0 to 239             ' Form a loop for the X position
        wColour = Glcd_Pixel(bXpos, 0) ' Read a pixel from the LCD
        Glcd_Plot(bXpos, 8)            ' Copy the pixel back to the LCD
        DelayMs 50                     ' Slow things down so we can see the pixel being copied
      Next                             ' Close the X position loop
    Note.
    The colour value can be any of 65536 values. i.e. 16-bit colour. Its arrangement is known as RGB565, where each colour element is signified by a group of bits. See http://en.wikipedia.org/wiki/RGB_color_model

    Glcd_Line

    Glcd_Line(pStartXpos, pStartYpos, pEndXpos, pEndYpos)

    Draw a line on the LCD’s screen using the current pixel colour.

    Operators.
    • pStartXpos: Starting X position of the line (0 to 239)
    • pStartYpos: Starting Y position of the line (0 to 319)
    • pEndXpos: Ending X position of the line (0 to 239)
    • pEndYpos: Ending Y position of the line (0 to 319)
    Example.
    Code:
      Include "Amicus18.inc"         ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"          ' Load the ILI9320 graphic LCD macros into the program
     
      Dim wEndYpos as Word           ' Create a word sized variable for ending Y position
      
      Glcd_Cls(clWhite)              ' Clear the LCD's screen with the colour white
      Glcd_PenColor(clRed)           ' Change the colour of the pixel to red
      For wEndYpos = 0 to 300        ' Form a loop for the ending Y position
        Glcd_Line(0, 0, 0, wEndYpos) ' Draw a line
      Next                           ' Close the ending Y position loop
    Glcd_LineTo

    Glcd_LineTo(pEndXpos, pEndYpos)

    Draw a line on the LCD’s screen starting from the end of a previous line using the current pixel colour.

    Operators.
    • pEndXpos: Ending X position of the line (0 to 239)
    • pEndYpos: Ending Y position of the line (0 to 319)
    Example.
    Code:
      Include "Amicus18.inc"       ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"        ' Load the ILI9320 graphic LCD macros into the program
    
      Glcd_Cls(clWhite)            ' Clear the LCD's screen with the colour white
      Glcd_PenColor(clRed)         ' Change the colour of the pixel to red
      Glcd_Line(0, 0, 319, 0)      ' Draw a line at the top of the LCD’s screen
      Glcd_LineTo(319, 239)        ' Draw a line at the right of the LCD’s screen
      Glcd_LineTo(0, 239)          ' Draw a line at the bottom of the LCD’s screen
      Glcd_LineTo(0, 0)            ' Draw a line at the left of the LCD’s screen
    Note.
    The Glcd_LineTo macro must follow immediately after a Glcd_Line macro, in order for its end coordinates to be still valid.

    Glcd_Vline

    Glcd_Vline(pXpos, pYpos, pSize)

    Draw a vertical line on the LCD’s screen using the current pixel colour.

    Operators.
    • pXpos: Starting X position of the line (0 to 239)
    • pYpos: Starting Y position of the line (0 to 319)
    • pSize: Length of the line (1 to 319)
    Example.
    Code:
      Include "Amicus18.inc"             ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"              ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bXpos as Byte                  ' Create a byte sized variable for X position 
      Dim wLength as Word                ' Create a word sized variable for length of the line
    
      Glcd_Cls(clWhite)                  ' Clear the LCD's screen with the colour white
    
      wLength = 0
      Glcd_PenColor(clRed)               ' Change the colour of the pixel to red
      For bXpos = 0 to 239               ' Form a loop for the X position
        Glcd_Vline(bXpos, 0, wLength)    ' Draw a vertical line
        Inc wLength                      ' Increment the length of the line
        If wLength = 239 Then            ' Has the line length reached 239 pixels?
          wLength = 0                    ' Yes. So reset it
        EndIf
      Next                               ' Close the X position loop
    Glcd_Hline

    Glcd_Hline(pXpos, pYpos, pSize)

    Draw a horizontal line on the LCD’s screen using the current pixel colour.

    Operators.
    • pXpos: Starting X position of the line (0 to 239)
    • pYpos: Starting Y position of the line (0 to 319)
    • pSize: Length of the line (1 to 319)
    Example.
    Code:
      Include "Amicus18.inc"             ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"              ' Load the ILI9320 graphic LCD macros into the program
    
      Dim wYpos as Byte                  ' Create a word sized variable for Y position
      Dim wLength as Word                ' Create a word sized variable for length of the line
    
      Glcd_Cls(clWhite)                  ' Clear the LCD’s screen with the colour white
    
      wLength = 0
      Glcd_PenColor(clRed)               ' Change the colour of the pixel to red
      For wYpos = 0 to 63                ' Form a loop for the Y position
        Glcd_Hline(0, wYpos, wLength)    ' Draw a horizontal line
        Inc wLength                      ' Increment the length of the line
      Next                               ' Close the Y position loop
    Glcd_Box

    Glcd_Box(pXpos, pYpos, pSize)

    Draw a box on the LCD’s screen using the current pixel colour.

    Operators.
    • pXpos: Starting X position of the box (0 to 239)
    • pYpos: Starting Y position of the box (0 to 319)
    • pSize: Size of the box in pixels (1 to 239)
    Example.
    Code:
      Include "Amicus18.inc"       ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"        ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bSize as Byte            ' Create a byte sized variable for size of the box 
    
      Glcd_Cls(clWhite)            ' Clear the LCD’s screen with the colour white
      Glcd_PenColor(clRed)         ' Change the colour of the pixel to red
      For bSize = 0 to 239 Step 4  ' Form a loop for the size of the box
        Glcd_Box(0, 0, bSize)      ' Draw a box
        DelayMs 100                ' Slow things down so we can see the box being drawn
      Next                         ' Close the size loop
    Glcd_Rectangle

    Glcd_Rectangle(pXpos, pYpos, pLength, pHeight)

    Draw a rectangle on the LCD’s screen using the current pixel colour.

    Operators.
    • pXpos: Starting X position of the rectangle (0 to 239)
    • pYpos: Starting Y position of the rectangle (0 to 319)
    • pLength: Length of the rectangle in pixels (1 to 239)
    • pHeight: Height of the rectangle in pixels (1 to 319)
    Example.
    Code:
      Include "Amicus18.inc"        ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"         ' Load the ILI9320 graphic LCD macros into the program
    
      Dim wHeight as Word           ' Create a word sized variable for height
      Dim wLength as Word           ' Create a word sized variable for length
    
      Glcd_Cls(clWhite)             ' Clear the LCD’s screen with the colour white
      Glcd_PenColor(clRed)          ' Change the colour of the pixel to red
      For wLength = 0 to 239 Step 4 ' Form a loop for the length
        wHeight = wLength / 2
        Glcd_Rectangle(0, 0, wLength, wHeight) ' Draw a rectangle
        DelayMs 100                 ' Slow things down so we can see it being drawn
      Next                          ' Close the loop
    Glcd_Circle

    Glcd_Circle(pXpos, pYpos, pRadius)

    Draw a circle on the LCD’s screen using the current pixel colour.

    Operators.
    • pXpos: Centre X position of the circle (0 to 239)
    • pYpos: Centre Y position of the circle (0 to 319)
    • pRadius: Radius of the circle in pixels (1 to 239)
    Example.
    Code:
      Include "Amicus18.inc"            ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"             ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bRadius as Byte               ' Create a byte sized variable for radius of the circle
    
      Glcd_Cls(clWhite)                 ' Clear the LCD’s screen with the colour white
      Glcd_PenColor(clRed)              ' Change the colour of the pixel to red
      For bRadius = 0 to 239 Step 4     ' Form a loop for the radius of the circle
        Glcd_Circle(119, 150, bRadius)  ' Draw a circle
        DelayMs 100                     ' Slow things down so we can see the circle being drawn
      Next                              ' Close the radius loop
    Glcd_PaperColour

    Glcd_PaperColour(pColour)

    Choose the colour of the text's background.

    Operator.
    • pColour: The colour of the background, which can be a value from 0 to 65535 in RGB565 format.
    Example.
    Code:
      Include "Amicus18.inc"          ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"            ' Load the ILI9320 graphic LCD macros into the program
    
      Glcd_Cls(clWhite)               ' Clear the LCD’s screen with the colour white
      Glcd_SetFont(Courier_14)        ' Choose the font required
      Glcd_PenColor(clBlack)          ' Change the colour of the text to black
      Glcd_PaperColour(clBrightBlue)  ' Change the  colour of the text's background
      Glcd_Cursor(0, 0)               ' Move to the initial position on the LCD
      Glcd_Print("Hello World")       ' Display some text
      Stop
    
    '-----------------------------------------------------------
    ' Load the font into the program
    '
      Include "Courier_14.inc"
    Note.
    The colour value can be any of 65536 values. i.e. 16-bit colour. Its arrangement is known as RGB565, where each colour element is signified by a group of bits. See http://en.wikipedia.org/wiki/RGB_color_model
    For our American friends, the macro library also recognises the text Glcd_PaperColor.

    Glcd_Cursor


    Glcd_Cursor(pXpos, pYpos)

    Move the text position on the LCD’s screen, prior to displaying ASCII characters.

    Operators.
    • pXpos: X position of the cursor, in pixels (0 to 239)
    • pYpos: Y position (line) of the cursor, in pixels (0 to 319)
    Example.
    Code:
      Include "Amicus18.inc"          ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board 
      Include "ILI9320.inc"           ' Load the ILI9320 graphic LCD macros into the program
    
      Glcd_Cls(clWhite)               ' Clear the LCD’s screen with the colour white
      Glcd_SetFont(Courier_14)        ' Choose the font required
      Glcd_PenColor(clBlack)          ' Change the colour of the text to black
      Glcd_PaperColour(clBrightBlue)  ' Change the colour of the text's background
      Glcd_Cursor(0, 0)               ' Move to the initial position on the LCD
      Glcd_Print("Hello World")       ' Display some text
      Stop
    
    '-----------------------------------------------------------
    ' Load the font into the program
    '
       Include "Courier_14.inc"
    Glcd_SetFont

    Glcd_SetFont(pFontName)

    Choose the font to use with the Glcd_Print macro.

    Operator.
    • pFontName: The font's name.
    Example.
    Code:
      Include "Amicus18.inc"          ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"           ' Load the ILI9320 graphic LCD macros into the program
    
      Glcd_Cls(clWhite)               ' Clear the LCD’s screen with the colour white
      Glcd_SetFont(Courier_14)        ' Choose the font required
      Glcd_PenColor(clBlack)          ' Change the colour of the text to black
      Glcd_PaperColour(clBrightBlue)  ' Change the  colour of the text's background
      Glcd_Cursor(0, 0)               ' Move to the initial position on the LCD
      Glcd_Print("Hello World")       ' Display some text
      Stop
    
    '-----------------------------------------------------------
    ' Load the font into the program
    '
      Include "Courier_14.inc"
    Note.
    Fonts can be created using a program that was first developed for the Proton compiler some years ago by Olivier de Broqueville.
    This can be downloaded from here, FontConverter.exe, however, it is also supplied with the source codes for the Colour Graphic LCD shield.

    The font required must be included into the program at a location not inside the flow of code. i.e. at the end of the program, or before any subroutines.

    Glcd_Print


    Glcd_Print(i)

    Display an ASCII string on the LCD at the current pixel position using the current pixel colour.

    Operator.
    • pString: The string to display on the LCD
    Example.
    Code:
      Include "Amicus18.inc"           ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"            ' Load the ILI9320 graphic LCD macros into the program
    
      Dim bTemp as Byte                ' Create a byte sized variable
      Dim wTemp as Word                ' Create a word sized variable
      Dim dTemp as Dword               ' Create a dword sized variable
      Dim fTemp as Float               ' Create a floating point sized variable
    
      Glcd_Cls(clWhite)                ' Clear the LCD’s screen with the colour white
      Glcd_SetFont(Courier_14)         ' Choose the font required
      Glcd_PenColor(clBlack)           ' Change the colour of the text to black
      Glcd_Cursor(0, 0)                ' Move to the initial position on the LCD
      Glcd_Print("Hello World")        ' Display some text
    
      bTemp = 0                        ' Reset bTemp
      wTemp = 0                        ' Reset wTemp
      dTemp = 0                        ' Reset dTemp
      fTemp = 0                        ' Reset fTemp
    
      While                            ' Form an infinite loop
        Glcd_Cursor(0, 24)             ' Move to the start of the second line
        Glcd_Print("Byte: ")
        Glcd_Print(Dec bTemp)          ' Convert an integer to ASCII and display it
        Glcd_Print("   ")
    
        Glcd_PaperColour(clBrightRed)  ' Change the colour of the text's background
        Glcd_Cursor(0, 44)             ' Move to the start of the third line
        Glcd_Print("Word: ")
        Glcd_Print(Dec wTemp)          ' Convert an integer to ASCII and display it
        Glcd_Print("   ")
    
        Glcd_PaperColour(clBrightBlue) ' Change the colour of the text's background
        Glcd_Cursor(0, 84)             ' Move to the start of the third line
        Glcd_Print("Dword: ")
        Glcd_Print(Dec dTemp)          ' Convert an integer to ASCII and display it
        Glcd_Print("   ")
        
        Glcd_PaperColour(clBrightGreen)' Change the colour of the text's background
        Glcd_Cursor(0, 104)            ' Move to the start of the fourth line
        Glcd_Print("Float: ")
        Glcd_Print(Dec1 fTemp)         ' Convert a float to ASCII and display it
    
        Inc bTemp                      ' Increment bTemp
        Inc wTemp                      ' Increment wTemp
        Inc dTemp                      ' Increment dTemp
        fTemp = fTemp + 0.2            ' Increment fTemp
    
        DelayMs 100                    ' Slow things down so we can see the text change
      Wend                             ' Do it forever
    
    '  -----------------------------------------------------------
    ' Load the  font into the program
    '
       Include "Courier_14.inc"
    Note.
    The string to display may contain any single modifier as used in the compiler’s Print command. i.e. Dec, Hex, Bin, Str, Cstr, Estr etc.. However, it may not contain the At modifier, and multiple modifiers seprated by commas will be ignored.

    The compiler's standard Print command can also be used instead of the Glcd_Print macro, giving extra flexability, However, the compiler's At modifier cannot be used.

    For example:
    Code:
    
      Include "Amicus18.inc"            ' Configure the compiler to use a PIC18F25K20 at 64MHz. i.e. An Amicus18 board
      Include "ILI9320.inc"             ' Load the ILI9320 graphic LCD macros into the program
    
      Dim wTemp as Word                 ' Create a word sized variable
    
      Glcd_Cls(clWhite)                 ' Clear the LCD’s screen with the  colour white
      Glcd_PaperColour(clBrightRed)     ' Change the colour of the text's background
      Glcd_SetFont(Courier_14)          ' Choose the font required
      Glcd_PenColor(clBlack)            ' Change the colour of the text to black
    
      wTemp = 0                         ' Reset wTemp
      While                             ' Form an infinite  loop
        Glcd_Cursor(0, 44)              ' Move to the start of a line
        Print "Word: ", Dec wTemp,"   " ' Convert an integer to ASCII and display it
        Inc wTemp                       ' Increment wTemp
        DelayMs 100                     ' Slow things down so we can see the text change
      Wend                              ' Do it forever
    
    '-----------------------------------------------------------
    ' Load the font into the program
    '
      Include "Courier_14.inc"
    The ILI9320 Graphic LCD library source code and demonstration programs can be downloaded from here: ILI9320_Glcd_Shield Source.zip