LCD_SPEED

Using LCD_SPEED:

The communication performance of a LCD display can be controlled via a #DEFINE. This method allows the timing to be optimised.

Example

#DEFINE LCD_SPEED  FAST
Define Required Connections

LCD_SPEED

Options are:
FAST - The speed is approximately 20,000 CPS.
MEDIUM - The speed is approximately 15,000 CPS.
SLOW - The speed is approximately 10,000 CPS.
OPTIMAL - The speed is approximately 30,000 CPS.

If LCD_SPEED is not defined, the speed defaults to SLOW

To change the performance (communications speed) of the LCD use #DEFINE LCD_SPEED. This method allows the timing to be optimised.

Example

  #DEFINE LCD_SPEED  FAST

If LCD_SPEED is not defined, the speed defaults to SLOW

Speed Parameter OPTIMAL

WHEN LCD_NO_RW is not defined, OPTIMAL disables fixed delays and allows the LCD operate as fast as it can.

In this mode, The the busy flag is polled before each byte is sent to the HD44780 controller.   This not only optimizes speed, but also assures that data is not sent to the diplay controler until it is ready to receive the data.

With most displays this equates to a speed of about 30,000 characters per second. For comparision about 10 times faster than I2C using a PC8574 Expander (See LCD_IO 10 or See LCD_IO 112)

OPTIMAL is only supported in LCD_IO 4,8 and only when LCD_NO_RW is not defined (RW Mode)

When #DEFINE LCD_NO_RW is defined, reading data from the HD44780 is not possible since this disables Read Mode on the controller.  In this case busy flag checking is not available and the GET subroutine is not avaiable.

In order to enable busy flag checking, and, therefore to use the GET command the following criteria must be true.

  1. LCD I/O Mode must be either 4-wire or 8-wire
  2. #DEFINE LCD_NO_RW is not defined
  3. An I\O pin is connected between the microcontroller and the RW connection on the LCD Display
  4. 'DEFINE LCD_RW port.pin is defined in the GCBASIC source code

Example:

  #DEFINE LCD_IO 4
  #DEFINE LCD_SPEED OPTIMAL
  #DEFINE LCD_WIDTH 20                ;specified lcd width for clarity only.  20 is the default width
  #DEFINE LCD_DB7 PORTB.5
  #DEFINE LCD_DB6 PORTB.4
  #DEFINE LCD_DB7 PORTB.3
  #DEFINE LCD_DB6 PORTB.2

  #DEFINE LCD_RW PORTA.3    'Must be defined for RW Mode
  #DEFINE LCD_RS PORTA.2
  #DEFINE LCD_ENABLE PORTA.1