#include "config.h"
#include "pic_utils.h"


Go to the source code of this file.
Defines | |
| #define | __lcd_h include |
| #define | LCD_CLEAR_DISP 0b00000001 |
| #define | lcd_clear_display() lcd_write_command(LCD_CLEAR_DISP); |
| Clear LCD display. | |
| #define | LCD_LINE1 0b10000000 |
| #define | LCD_LINE2 0b11000000 |
| #define | LCD_LINE3 0b10010100 |
| #define | LCD_LINE4 0b11010100 |
| #define | lcd_return_home() lcd_write_command(LCD_RETURN_HOME); |
| Return cursor home. | |
| #define | LCD_RETURN_HOME 0b00000010 |
| #define | LCD_SET_DRAM_ADDR 0b10000000 |
Functions | |
| void | lcd_init () |
| Initialise LCD ready for display. | |
| void | lcd_setup () |
| Setup port and pins to talk to LCD. | |
| void | lcd_wait_busy () |
| Wait while LCD is busy. | |
| void | lcd_write_command (uns8 data) |
| Sends a command to the LCD. | |
| void | lcd_write_data (uns8 data) |
| Send one byte of data to the LCD. | |
| void | lcd_write_data_int (uns16 i) |
| Print a 16 bit integer the the LCD. | |
| void | lcd_write_data_str (char *str) |
| Print a string to the LCD. | |
Definition in file lcd.h.
| #define LCD_CLEAR_DISP 0b00000001 |
Clear LCD display
Definition at line 42 of file lcd.h.
Referenced by lcd_cursor_home(), and lcd_init().
| #define lcd_clear_display | ( | ) | lcd_write_command(LCD_CLEAR_DISP); |
| #define lcd_return_home | ( | ) | lcd_write_command(LCD_RETURN_HOME); |
| #define LCD_RETURN_HOME 0b00000010 |
| #define LCD_SET_DRAM_ADDR 0b10000000 |
| void lcd_init | ( | ) |
Configures LCD for 4 bit operation and gets ready for displaying text
Definition at line 64 of file lcd.c.
References LCD_CLEAR_DISP, LCD_RETURN_HOME, lcd_toggle_e(), lcd_write_command(), and lcd_write_nibble().

| void lcd_setup | ( | ) |
Call this routine first, to set up tris bits correctly to talk to the LCD
Definition at line 47 of file lcd.c.
References clear_pin, and make_output.
| void lcd_wait_busy | ( | ) |
Internal routine to wait while the LCD is busy and unable to accept more data
Definition at line 134 of file lcd.c.
References clear_pin, PORTA, set_pin, and test_pin.
Referenced by lcd_write_command(), lcd_write_data(), and lcd_write_data_str().

| void lcd_write_command | ( | uns8 | data | ) |
Use this to send commands to the LCD, eg, changing cursor position
Definition at line 93 of file lcd.c.
References clear_pin, lcd_wait_busy(), and lcd_write_byte().
Referenced by lcd_cursor_home(), lcd_init(), lcd_set_cgram_pos(), and lcd_set_ddram_pos().


| void lcd_write_data | ( | uns8 | data | ) |
Definition at line 103 of file lcd.c.
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.

| void lcd_write_data_int | ( | uns16 | i | ) |
Displays an unsigned 16 bit integer on the LCD
Definition at line 125 of file lcd.c.
References lcd_write_data_str().

| void lcd_write_data_str | ( | char * | str | ) |
Display the string on the LCD from the current cursor position
Definition at line 112 of file lcd.c.
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.
Referenced by lcd_write_data_int().


1.5.5