# lcd_hd44780_serial_sw

LCD library for HD44780 compatible LCDs, interfaced with 1 pin (serial_sw)

Author | Joep Suijs, Copyright © 2008..2009, all rights reserved.
Adapted-by | Richard Zengerink (lcd_init)
Compiler | >=2.4g

Description

       Software serial interface for HD44780 compatible alphanumeric LCD screens.
     --
       Directions for use of this library in application programs
       (in this sequence):
       1. Declare the following constants:
             const byte LCD_ROWS     = 2              -- 1, 2 or 4 lines
             const byte LCD_CHARS    = 16             -- 8, 16 or 20 chars per line
          and variables (aliases):
             var bit serial_sw_tx_pin  is  pin_d0     -- pin on which lcd is connected

       2. Set the chosen LCD dataport and handshake pins to output:
             pin_d0_direction = output

       3. Include this library.

       4. Call lcd_init() to initialize the lcd controller.

       Above is an example for a 2x16 LCD, connected to pin d0

       See hd_44780_common for the LCD API.

Dependencies

- delay
- serial_software
- lcd_hd44780_common

## Summary

### Global variables/contants

- `var bit serial_sw_rx_pin ; dummy to include lib; will be optimised away.`
- `const bit serial_sw_invert = true ; normal (low active) serial comms`
- `const serial_sw_baudrate = 57600`
- `var bit lcd_rs_shadow`

### Procedures

- `lcd_backlight(bit in onoff)`
- `lcd_init()`
- `lcd_backlight_variable(byte in value)`

Private

- `__lcd_write_nibble( byte in value )`
- `__lcd_write( byte in value )`
- `_lcd_write_command(byte in value)`
- `_lcd_write_data(byte in value)`

### Functions

## API details

### Global variables/contants

- `var bit serial_sw_rx_pin ; dummy to include lib; will be optimised away.`

  No documentation found

- `const bit serial_sw_invert = true ; normal (low active) serial comms`

  No documentation found

- `const serial_sw_baudrate = 57600`

  No documentation found

- `var bit lcd_rs_shadow`

  No documentation found

### Procedures

- `lcd_backlight(bit in onoff)`

      lcd_backlight - turn backlite on/off

- `lcd_init()`

- `lcd_backlight_variable(byte in value)`

      lcd_backlight_variable - set backlight level

Private

- `__lcd_write_nibble( byte in value )`

      sends low nibble from value to the LCD
      can be used for both commands and data
      (requires no wait cycli inbetween upper and lower nibble)
      (this routine is only used inside this file)

- `__lcd_write( byte in value )`

      sends byte from value to register of the LCD
      (this procedure is only used inside this file)

- `_lcd_write_command(byte in value)`

      sends command byte in value to LCD
      for slow commands an extra delay should be added

- `_lcd_write_data(byte in value)`

      sends data byte in value to LCD
      for slow commands an extra delay should be added

### Functions

## Related samples

No sample found