PIC18 LaurTec Library
3.1.2
Open Source C Library for PIC18 Microcontrollers based on C18 - XC8 Compilers
|
Go to the source code of this file.
Functions | |
void | enable_pulse_LCD (void) |
void | send_command_LCD (unsigned char data) |
void | home_LCD (void) |
void | shift_LCD (unsigned char shift, unsigned char number_of_shift) |
void | shift_cursor_LCD (unsigned char shift, unsigned char number_of_shift) |
void | goto_line_LCD (unsigned char line) |
void | goto_xy_LCD (unsigned char x, unsigned char y) |
void | write_char_LCD (unsigned char value) |
void | write_message_LCD (const rom unsigned char *buffer) |
void | write_string_LCD (unsigned char *buffer) |
void | write_integer_LCD (int value, unsigned char number_of_digits) |
void | clear_LCD (void) |
void | cursor_LCD (unsigned char active, unsigned char blinking) |
void | backlight_LCD (unsigned char active) |
void | initialize_LCD (unsigned unsigned char quartz_frequency) |
Variables | |
unsigned char | data_buffer = 0 |
unsigned char | PCF8574_address = 0 |
void backlight_LCD | ( | unsigned char | active | ) |
This function controls the backligth LED.
active | Activate the LED backlight [TURN_ON_LED_LCD, TURN_OFF_LED_LCD] |
blinking | Let the cursor blink [BLINKING_ON,BLINKING_OFF] |
Definition at line 275 of file LCD_44780_I2C.c.
References data_buffer, PCF8574_address, PCF8574_write_data(), and TURN_ON_LED_LCD.
void clear_LCD | ( | void | ) |
This Function cleans the LCD display.
Definition at line 257 of file LCD_44780_I2C.c.
References send_command_LCD().
void cursor_LCD | ( | unsigned char | active, |
unsigned char | blinking | ||
) |
This function controls the cursor option (blinking, active)
active | Activate the cursor, showing it or not [TURN_ON_CURSOR, TURN_OFF_CURSOR] |
blinking | Let the cursor blink [BLINKING_ON,BLINKING_OFF] |
Definition at line 266 of file LCD_44780_I2C.c.
References SendCommand.
void enable_pulse_LCD | ( | void | ) |
This function generates the Enable pulse.
Definition at line 56 of file LCD_44780_I2C.c.
References data_buffer, delay_ms(), LCD_E, PCF8574_address, and PCF8574_write_data().
void goto_line_LCD | ( | 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 122 of file LCD_44780_I2C.c.
References send_command_LCD().
void goto_xy_LCD | ( | 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 147 of file LCD_44780_I2C.c.
References goto_line_LCD(), RIGHT, and shift_cursor_LCD().
void home_LCD | ( | void | ) |
This function locates the cursor at home location. First line first character.
Definition at line 85 of file LCD_44780_I2C.c.
References send_command_LCD().
void initialize_LCD | ( | unsigned unsigned char | quartz_frequency | ) |
Definition at line 288 of file LCD_44780_I2C.c.
References BLINKING_OFF, ClearLCD, CursorLCD, data_buffer, delay_ms(), PCF8574_address, PCF8574_ADDRESS_H, PCF8574_ADDRESS_L, PCF8574_write_data(), send_command_LCD(), setQuartz(), and TURN_OFF_CURSOR.
void send_command_LCD | ( | unsigned char | data | ) |
This function generates the Enable pulse.
data | Data to be sent [0..255] |
Definition at line 68 of file LCD_44780_I2C.c.
References data_buffer, enable_pulse_LCD(), PCF8574_address, and PCF8574_write_data().
void shift_cursor_LCD | ( | unsigned char | shift, |
unsigned char | number_of_shift | ||
) |
This function shifts the LCD cursor on the left or rigt. The position of the cursor is where the next writting will be performed.
shift | Specify where the shift should be [LEFT, RIGHT]. |
number_of_shift | Specify the number of times the shift is executed. |
Definition at line 109 of file LCD_44780_I2C.c.
References send_command_LCD().
void shift_LCD | ( | unsigned char | shift, |
unsigned char | number_of_shift | ||
) |
This function shifts the LCD screen on the left or rigt.
shift | Specify where the shift should be [LEFT, RIGHT]. |
number_of_shift | Specify the number of times the shift is executed. |
Definition at line 95 of file LCD_44780_I2C.c.
References send_command_LCD().
void write_char_LCD | ( | unsigned char | value | ) |
This function writes a char to the LCD display. (e.g WriteCharLCD ('a'); )
value | Specify the character to be sent [0-128 ASCII code]. |
Definition at line 157 of file LCD_44780_I2C.c.
References data_buffer, LCD_RS, PCF8574_address, PCF8574_write_data(), and send_command_LCD().
void write_integer_LCD | ( | int | value, |
unsigned char | number_of_digits | ||
) |
This function writes an integer to the LCD display. The integer is converted to string.
value | It is integer that must be written to the LCD diplay. |
numeber_of_digits | It specifies the number of shown digit [0-5]. 0: Left Justified 1-5: Right Justified with n digit |
Definition at line 218 of file LCD_44780_I2C.c.
References write_string_LCD().
void write_message_LCD | ( | const rom unsigned char * | buffer | ) |
This function writes a const string to the LCD display, e.g write_message_LCD("Hello"); .
buffer | Is a const string written in rom (is not an array). |
Definition at line 182 of file LCD_44780_I2C.c.
References write_char_LCD(), and write_message_LCD().
void write_string_LCD | ( | 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 202 of file LCD_44780_I2C.c.
References write_char_LCD().
unsigned char data_buffer = 0 |
Definition at line 50 of file LCD_44780_I2C.c.
unsigned char PCF8574_address = 0 |
Definition at line 51 of file LCD_44780_I2C.c.