A small library/program for using the 1602 LCD display in 4 bit mode.
Go to file
Jake Goodwin 7e7cb73cd2 extracted protos and macros to header file. 2023-01-07 21:22:48 -08:00
.gitignore Initial commit 2023-01-06 04:01:15 +00:00
1602LCD_char_display.c extracted protos and macros to header file. 2023-01-07 21:22:48 -08:00
1602LCD_char_display.h extracted protos and macros to header file. 2023-01-07 21:22:48 -08:00
1602LCD_char_display.map INIT COMMIT 2023-01-05 20:09:50 -08:00
ADM1602K-NSW-FBS-3.3v.pdf Added datasheet for 1602LCD 2023-01-07 17:24:43 -08:00
LICENSE Initial commit 2023-01-06 04:01:15 +00:00
Makefile INIT COMMIT 2023-01-05 20:09:50 -08:00
README.md updated with current status and usage 2023-01-07 21:18:04 -08:00

README.md

AVR_ATMEGA_1602LCD

A small library/program for using the 1602 LCD display in 4 bit mode.

Hardware:

  • LCD 1602 ADM1602K-NSW-FBS-3.3v or ADM1602K-NSW-FBS-5.0v
  • AVR Micro-controller

Supported Controllers:

List of supported controllers:


  • ATMega48
  • ATMega88
  • ATMega168
  • ATMega328

Usage:

#include "AVR_ATMEGA_1602LCD.h"

void do_stuff() {
    PORTD = 0x00;
    DDRD = 0xff;
    init_lcd();
    
    return_home_lcd();
    set_entry_mode_increment_lcd();
   
    //Refernce the datasheet for charecter codes. 
    write_lcd_address(0x7f);    //Right pointing arrow 
    
    //wait a bit.
    _delay_ms(1000);

    //clear it up
    clear_lcd();
    return_home_lcd();

    //Do more stuff...
}

RoadMap:

  1. ADD function to print strings
  2. ADD function to display bit images
  3. ADD function to act as a loading screen.
  4. ADD animations
  5. ADD PWM control for contrast
  6. ADD PWM control for backlight

ISSUES:

Currently during powerloss events and initialization, long wire runs or residual charge can cause the LCD to maintain memory for a shor duration.

In 4bit mode it's possible to end up with a invalid "nibble" in the LCD memory in this case the system should power cycle the LCD unit assuming it's controlled by the microcontroller.