LTlib LaurTec Library
4.0.0 Beta
Open Source C Library for Microchip Microcontrollers based on XC8 Compiler
|
#include "LCD_44780_I2C.h"
Go to the source code of this file.
Functions | |
void | LCD_enable_pulse (void) |
void | LCD_send_command (unsigned char data) |
void | LCD_home (void) |
void | LCD_shift (unsigned char shift, unsigned char number_of_shift) |
void | LCD_shift_cursor (unsigned char shift, unsigned char number_of_shift) |
void | LCD_goto_line (unsigned char line) |
void | LCD_goto_xy (unsigned char x, unsigned char y) |
void | LCD_write_char (unsigned char value) |
void | LCD_write_message (const rom unsigned char *buffer) |
void | LCD_write_string (unsigned char *buffer) |
void | LCD_write_integer (signed int value, unsigned char number_of_digits, unsigned char zero_cleaning) |
void | LCD_clear (void) |
void | LCD_cursor (unsigned char active, unsigned char blinking) |
void | LCD_backlight (unsigned char active) |
void | LCD_initialize (unsigned char quartz_frequency) |
Variables | |
unsigned char | data_buffer = 0 |
unsigned char | I2C_device_address = 0 |
void LCD_backlight | ( | unsigned char | active | ) |
This function controls the backligth LED.
active | Activate the LED backlight [LCD_TURN_ON_LED, LCD_TURN_OFF_LED] |
blinking | Let the cursor blink [LCD_BLINKING_ON, LCD_BLINKING_OFF] |
Definition at line 311 of file LCD_44780_I2C.c.
References data_buffer, I2C_device_address, LCD_TURN_ON_LED, MCP2300x_set_port_value(), and PCF8574_write_data().
void LCD_clear | ( | void | ) |
This Function cleans the LCD display.
Definition at line 293 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_cursor | ( | unsigned char | active, |
unsigned char | blinking | ||
) |
This function controls the cursor option (blinking, active)
active | Activate the cursor, showing it or not [LCD_TURN_ON_CURSOR, LCD_TURN_OFF_CURSOR] |
blinking | Let the cursor blink [LCD_BLINKING_ON, LCD_BLINKING_OFF] |
Definition at line 302 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_enable_pulse | ( | void | ) |
This function generates the Enable pulse.
Definition at line 49 of file LCD_44780_I2C.c.
References data_buffer, delay_ms(), I2C_device_address, LCD_E, MCP2300x_set_port_value(), and PCF8574_write_data().
void LCD_goto_line | ( | unsigned char | line | ) |
This function locates the LCD cursor on the selected line.
line | Specify the number of the line [1,2,3,4] |
Definition at line 139 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_goto_xy | ( | unsigned char | x, |
unsigned char | y | ||
) |
This function locates the LCD cursor to an arbitrary X Y location. Y represents the line number from top.
x | It Specifies horizontal position |
y | It Specifies vertical position (line number) |
Definition at line 164 of file LCD_44780_I2C.c.
References LCD_goto_line(), LCD_shift_cursor(), and RIGHT.
void LCD_home | ( | void | ) |
This function locates the cursor at home location. First line first character.
Definition at line 102 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_initialize | ( | unsigned char | quartz_frequency | ) |
This function initializes the LCD to work in 4 bit modality.
quartz_frequency | Quartz freq. expressed in MHz used to run the CPU. |
Definition at line 331 of file LCD_44780_I2C.c.
References data_buffer, delay_ms(), delay_set_quartz(), DEVICE_ADDRESS_H, DEVICE_ADDRESS_L, I2C_device_address, LCD_BLINKING_OFF, LCD_BUS_DATA_RATE, LCD_clear(), LCD_cursor(), LCD_send_command(), LCD_TURN_OFF_CURSOR, MCP2300x_initialize(), MCP2300x_set_port_direction(), MCP2300x_set_port_value(), PCF8574_initialize(), and PCF8574_write_data().
void LCD_send_command | ( | unsigned char | data | ) |
This function generates the Enable pulse.
data | Data to be sent [0..255] |
Definition at line 78 of file LCD_44780_I2C.c.
References data_buffer, I2C_device_address, LCD_enable_pulse(), MCP2300x_set_port_value(), and PCF8574_write_data().
void LCD_shift | ( | unsigned char | shift, |
unsigned char | number_of_shift | ||
) |
This function shifts the LCD screen on the left or right.
shift | Specify where the shift should be [LCD_LEFT, LCD_RIGHT]. |
number_of_shift | Specify the number of times the shift is executed. |
Definition at line 112 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_shift_cursor | ( | unsigned char | shift, |
unsigned char | number_of_shift | ||
) |
This function shifts the LCD cursor on the left or right. The position of the cursor is where the next writing will be performed.
shift | Specify where the shift should be [LCD_LEFT, LCD_RIGHT]. |
number_of_shift | Specify the number of times the shift is executed. |
Definition at line 126 of file LCD_44780_I2C.c.
References LCD_send_command().
void LCD_write_char | ( | unsigned char | value | ) |
This function writes a char to the LCD display. (e.g LCD_write_char ('a'); )
value | Specify the character to be sent [0-128 ASCII code]. |
Definition at line 174 of file LCD_44780_I2C.c.
References data_buffer, I2C_device_address, LCD_RS, LCD_send_command(), MCP2300x_set_port_value(), and PCF8574_write_data().
void LCD_write_integer | ( | signed int | value, |
unsigned char | number_of_digits, | ||
unsigned char | zero_cleaning | ||
) |
Definition at line 249 of file LCD_44780_I2C.c.
References LCD_write_string(), and ZERO_CLEANING_ON.
void LCD_write_message | ( | const rom unsigned char * | buffer | ) |
This function writes a const string to the LCD display, e.g LCD_write_message("Hello"); .
buffer | Is a const string written in rom (is not an array). |
Definition at line 213 of file LCD_44780_I2C.c.
References LCD_write_char(), and LCD_write_message().
void LCD_write_string | ( | unsigned char * | buffer | ) |
This function writes an array of char to the LCD display, terminated with /0 .
buffer | It is an array of char terminated with /0 . |
Definition at line 233 of file LCD_44780_I2C.c.
References LCD_write_char().
unsigned char data_buffer = 0 |
Definition at line 43 of file LCD_44780_I2C.c.
unsigned char I2C_device_address = 0 |
Definition at line 44 of file LCD_44780_I2C.c.