Library for Display based on PCF8574 and HD44780 (2 lines, 16 characters) and AVR Mega16 (12 MHz).
This library is based on the work of Nico Eichelmann and Thomas Eichelmann (2006), clean up by Falk Brunner (2014) and the I²C library by Peter Fleury.
How to start:
- Add
megacard_lcd.c
andmegacard_lcd.h
to your project - Connect display (see "Connection")
- See "Example" for a usage example
- Display GND to Megacard GND
- Display VCC to Megacard VCC
- Display SDA to Megacard PORT C Bit 1
- Display SCL to Megacard PORT C Bit 0
Remove LED Jumper (X9) - otherwise it will not work
void lcd_init()
- initialise I2C and the displayvoid lcd_clear()
- clear content of displayvoid lcd_printf(uint8_t line, uint8_t position, char *message, ...)
- use likeprintf
to output a string to the given line and positionvoid lcd_light(uint8_t on)
- turn on backlight ifon
is other than 0
#include "megacard_lcd.h"
int main(void)
{
lcd_init();
lcd_printf(0, 4, "Megacard");
lcd_printf(1, 2, "HTL Rankweil");
while (1);
}