LCD_IO 107

Using connection mode 107:

The LCD is controlled via the serial port. A type 107 is a K107 serial adapter. To use mode 107 you must define the serial port as normal in your GCB code. Then, serial speed to match the K107 adapter.

Relevant Constants:

These constants are used to control settings for the Liquid Crystal Display routines included with GCBASIC. To set them, place a line in the main program file that uses #define to assign a value to the particular constant.

When using 107 mode only one constants must be set - all others can be ignored.

Constant Name Controls Value

LCD_IO

I/O mode

107 or K107

Example Code:

    #chip 16f18313
    #option Explicit

    'Generated by PIC PPS Tool for GCBASIC
    'Generated for 16f18313
    '
    #startup InitPPS, 85
    #define PPSToolPart 16f18313

    Sub InitPPS

            'Module: EUSART
            RA5PPS = 0x0014    'TX > RA5

    End Sub
    'Template comment at the end of the config file

    'USART settings for USART1
    #define USART_BAUD_RATE 115200
    #define USART_TX_BLOCKING
    #define USART_DELAY OFF

    #define LCD_IO 107   'K107


    do Forever
      CLS
      Print "GCBASIC 2021"
      Locate 1, 0
      Print "Reading ADC ANA0"

      Locate 3, 0
      Print "Scaled = "
      Print Scale( ReadAD( ANA0 ), 0, 236, 0, 100 )
      wait 100 ms
    loop

See the separate sections of the Help file for the specifics of each Connection Mode.

For more help, see LCD_IO 0, LCD_IO 1, LCD_IO 2 LCD_IO 2_74xx164, LCD_IO 2_74xx174, LCD_IO 4, LCD_IO 8, LCD_IO 10