An AVR Atmega LCD Menu builder library

Summary of An AVR Atmega LCD Menu builder library


The article presents "lcdmenu1," a simple LCD menu builder for AVR Atmega microcontrollers. It operates using four buttons (up, down, left, right) to navigate menu categories and child/parent items, with editing and EEPROM storage capabilities. Built upon Dean Camera's micro-menu and using Peter Fleury's HD44780 LCD library, it supports 2x16 LCDs but can be adapted to other sizes. The core builder function creates menu items and handles navigation, entry, and exit callbacks. Sample code for menu creation and folder structures is provided for easy implementation.

Parts used in the lcdmenu1 Project:

  • AVR Atmega microcontroller
  • 4 Buttons (Up, Down, Left, Right)
  • 2x16 HD44780 LCD Display
  • EEPROM (Internal or External)
  • Peter Fleury HD44780 LCD library
  • Dean Camera micro-menu library

lcdmenu1 is a simple and small lcd menu builder for AVR Atmega.
It works with only 4 buttons (up, down, right, left), additional buttons can be added.
It can also store values to eepromAn AVR Atmega LCD Menu builder library
User can use button up and down to list menu categories, right and left to browse child and parent.
If an item is selected, the right button makes the menu enter in edit-mode.
In this mode button up and down changes the item value, left exit without save to eeprom, right exit and save to eeprom.
The menu costructor is based upon Dean Camera micro-menu. It works on 2×16 lcd using the Peter Fleury lcd library for HD44780, but it can also be change to fit other lcd resolution.
It is test on 2×16 HD44780 device, sample code is provided.
The main function is the builder function:
lcdmenu1_makemenu(name, next, prev, parent, sibling, selectfunc, enterfunc, exitfunc, text);
name is the name of the menuitem
next is the pointer to next menuitem
prev is the pointer to the prev menuitem
parent is the parent of the menuitem
sibling is the child of the menuitem
enterfunc is the function to be called when user enter this menuitem
exitfunc is the function to be called when user exit this menuitem
text is the text view on lcd for the menuitem
The sample  code provided build menu item, menu folder, menu subfoder.Schematic An AVR Atmega LCD Menu builder library
For more detail: An AVR Atmega LCD Menu builder library


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top