Skip to content

semiversus/megacard_display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Megacard-I2C-Display

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.

Megacard

How to start:

  • Add megacard_lcd.c and megacard_lcd.h to your project
  • Connect display (see "Connection")
  • See "Example" for a usage example

Connection

  • 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

Available commands

  • void lcd_init() - initialise I2C and the display
  • void lcd_clear() - clear content of display
  • void lcd_printf(uint8_t line, uint8_t position, char *message, ...) - use like printf to output a string to the given line and position
  • void lcd_light(uint8_t on) - turn on backlight if on is other than 0

Example

#include "megacard_lcd.h"

int main(void)
{
  lcd_init();
  
  lcd_printf(0, 4, "Megacard");
  lcd_printf(1, 2, "HTL Rankweil");
  
  while (1);
}

About

I2C Display based on PCF8574

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages