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.
Macros | |
#define | LCD_D0 PORTDbits.RD4 |
#define | LCD_D1 PORTDbits.RD5 |
#define | LCD_D2 PORTDbits.RD6 |
#define | LCD_D3 PORTDbits.RD7 |
#define | LCD_RS PORTDbits.RD2 |
#define | LCD_E PORTDbits.RD3 |
#define | LCD_RW PORTDbits.RD1 |
#define | LCD_LED PORTCbits.RC1 |
#define | LEFT 0 |
#define | RIGHT 1 |
#define | TURN_ON_LED_LCD 1 |
#define | TURN_OFF_LED_LCD 0 |
#define | TURN_ON_CURSOR 1 |
#define | TURN_OFF_CURSOR 0 |
#define | BLINKING_ON 1 |
#define | BLINKING_OFF 0 |
#define | Epulse enable_pulse_LCD |
#define | SendCommand send_command_LCD |
#define | HomeLCD home_LCD |
#define | ShiftLCD shift_LCD |
#define | ShiftCursorLCD shift_cursor_LCD |
#define | GotoLineLCD goto_line_LCD |
#define | WriteCharLCD write_char_LCD |
#define | WriteStringLCD write_message_LCD |
#define | WriteVarLCD write_string_LCD |
#define | WriteIntLCD write_integer_LCD |
#define | ClearLCD clear_LCD |
#define | CursorLCD cursor_LCD |
#define | BacklightLCD backlight_LCD |
#define | OpenLCD initialize_LCD |
Functions | |
void | enable_pulse_LCD (void) |
void | send_command_LCD (unsigned char bit_3, unsigned char bit_2, unsigned char bit_1, unsigned char bit_0) |
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 char quartz_frequency) |
#define BacklightLCD backlight_LCD |
Definition at line 324 of file LCD_44780.h.
#define BLINKING_OFF 0 |
Definition at line 136 of file LCD_44780.h.
#define BLINKING_ON 1 |
Definition at line 135 of file LCD_44780.h.
#define ClearLCD clear_LCD |
Definition at line 295 of file LCD_44780.h.
#define CursorLCD cursor_LCD |
Definition at line 310 of file LCD_44780.h.
#define Epulse enable_pulse_LCD |
Definition at line 148 of file LCD_44780.h.
#define GotoLineLCD goto_line_LCD |
Definition at line 214 of file LCD_44780.h.
#define HomeLCD home_LCD |
Definition at line 174 of file LCD_44780.h.
#define LCD_D0 PORTDbits.RD4 |
This value are used as default ones
Definition at line 111 of file LCD_44780.h.
#define LCD_D1 PORTDbits.RD5 |
Definition at line 112 of file LCD_44780.h.
#define LCD_D2 PORTDbits.RD6 |
Definition at line 113 of file LCD_44780.h.
#define LCD_D3 PORTDbits.RD7 |
Definition at line 114 of file LCD_44780.h.
#define LCD_E PORTDbits.RD3 |
Definition at line 116 of file LCD_44780.h.
#define LCD_LED PORTCbits.RC1 |
Definition at line 118 of file LCD_44780.h.
#define LCD_RS PORTDbits.RD2 |
Definition at line 115 of file LCD_44780.h.
#define LCD_RW PORTDbits.RD1 |
Definition at line 117 of file LCD_44780.h.
#define LEFT 0 |
Definition at line 126 of file LCD_44780.h.
#define OpenLCD initialize_LCD |
Definition at line 337 of file LCD_44780.h.
#define RIGHT 1 |
Definition at line 127 of file LCD_44780.h.
#define SendCommand send_command_LCD |
Definition at line 166 of file LCD_44780.h.
#define ShiftCursorLCD shift_cursor_LCD |
Definition at line 203 of file LCD_44780.h.
#define ShiftLCD shift_LCD |
Definition at line 188 of file LCD_44780.h.
#define TURN_OFF_CURSOR 0 |
Definition at line 133 of file LCD_44780.h.
#define TURN_OFF_LED_LCD 0 |
Definition at line 130 of file LCD_44780.h.
#define TURN_ON_CURSOR 1 |
Definition at line 132 of file LCD_44780.h.
#define TURN_ON_LED_LCD 1 |
Definition at line 129 of file LCD_44780.h.
#define WriteCharLCD write_char_LCD |
Definition at line 238 of file LCD_44780.h.
#define WriteIntLCD write_integer_LCD |
Definition at line 287 of file LCD_44780.h.
#define WriteStringLCD write_message_LCD |
Definition at line 258 of file LCD_44780.h.
#define WriteVarLCD write_string_LCD |
Definition at line 270 of file LCD_44780.h.
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 269 of file LCD_44780.c.
void clear_LCD | ( | void | ) |
This Function cleans the LCD display.
Definition at line 251 of file LCD_44780.c.
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 260 of file LCD_44780.c.
void enable_pulse_LCD | ( | void | ) |
This function generates the Enable pulse.
Definition at line 49 of file LCD_44780.c.
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 111 of file LCD_44780.c.
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 136 of file LCD_44780.c.
void home_LCD | ( | void | ) |
This function locates the cursor at home location. First line first character.
Definition at line 74 of file LCD_44780.c.
void initialize_LCD | ( | unsigned char | quartz_frequency | ) |
This funnction initializes the LCD to work in 4 bit modality.
quartz_frequency | Quartz freq. expressed in MHz used to run the CPU. |
Definition at line 277 of file LCD_44780.c.
void send_command_LCD | ( | unsigned char | bit_3, |
unsigned char | bit_2, | ||
unsigned char | bit_1, | ||
unsigned char | bit_0 | ||
) |
This function generates the Enable pulse.
bit_0 | bit 0 of the data bus (4 bit modality) |
bit_1 | bit 1 of the data bus (4 bit modality) |
bit_2 | bit 2 of the data bus (4 bit modality) |
bit_3 | bit 3 of the data bus (4 bit modality) |
Definition at line 61 of file LCD_44780.c.
References enable_pulse_LCD(), LCD_D0, LCD_D1, LCD_D2, and LCD_D3.
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 98 of file LCD_44780.c.
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 84 of file LCD_44780.c.
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 145 of file LCD_44780.c.
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 210 of file LCD_44780.c.
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 174 of file LCD_44780.c.
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 194 of file LCD_44780.c.