33#include <util/delay.h>
38#define MESSAGE_DELAY 2000
39#define ANIMATION_DELAY 300
46 .two_line_display =
true,
47 .five_by_ten_font =
false,
48 .increment_counter =
true,
49 .display_shift =
false,
50 .cursor_enable =
false,
51 .blink_enable =
false,
54uint8_t test_number = 34;
69 _delay_ms(MESSAGE_DELAY);
79 _delay_ms(MESSAGE_DELAY);
83 _delay_ms(ANIMATION_DELAY);
85 for (uint8_t count = 0; count < 12; ++count)
88 _delay_ms(ANIMATION_DELAY);
90 _delay_ms(MESSAGE_DELAY);
95 _delay_ms(ANIMATION_DELAY);
97 for (uint8_t count = 0; count < 12; ++count)
100 _delay_ms(ANIMATION_DELAY);
102 _delay_ms(MESSAGE_DELAY);
109 _delay_ms(MESSAGE_DELAY);
116 _delay_ms(MESSAGE_DELAY);
123 _delay_ms(MESSAGE_DELAY);
132 _delay_ms(MESSAGE_DELAY);
void lcd_shift_cursor_left(uint8_t distance)
Moves cursor left without changing DDRAM contents.
void lcd_print_string(const char *str)
Prints a string of characters to the display.
void lcd_print_integer(int16_t number)
Prints an integer variable.
void lcd_shift_display_right(uint8_t distance, bool delay)
Shifts display right without changing DDRAM contents.
void init_lcd(lcd_config_t *p_config)
Initialisation routine (run once at startup).
void lcd_fast_clear(void)
Writes space characters to all 32 sections of display (or 16 if in 1 line mode).
void lcd_shift_display_left(uint8_t distance, bool delay)
Shifts display left without changing DDRAM contents.
void lcd_reconfigure(void)
Edits config settings on the display (lcd_config_t members must be changed first).
void lcd_return_home(void)
Sets DDRAM address 0 in address counter.
void lcd_shift_cursor_right(uint8_t distance)
Moves cursor right without changing DDRAM contents.
void lcd_set_cursor(uint8_t column, uint8_t row)
Sets cursor location using x and y coordinates.
Driver for the HD44780 based 16x2 liquid crystal display.
int main()
Main routine to be executed on the MCU.
Configuration struct, to be instantiated and values assigned before passing it's address into and cal...
bool cursor_enable
true = enabled, false = disabled.
bool eight_bit_mode
true = 8 bit mode, false = 4 bit mode.
bool blink_enable
true = enabled, false = disabled.