You Are Here: Home » AVR ATmega Projects » AVR uartConfig – an atmega and arduino eeprom config library

AVR uartConfig – an atmega and arduino eeprom config library




Update to version 2014-06-13

AVR uartConfig is a small footprint library you can use to config your micro eeprom through uart communication.
AVR uartConfig - an atmega and arduino eeprom config library

AVR uartConfig is a set of tools running on Windows, Linux and Mac, made up or:

  • a avrgcc firmware library
  • a commandline utility
  • a gui tool

Applications
This library prevent you to wire up a disply and buttons to configure your micro eeprom. For example is it usefull to setup PID parameters of your robot by uart/bluetooth uart, or for other small devices that doesn’t came with an output/input interface.

How does it works
Firmare side you have to setup an eeprom structure which contains all the variable you want to save on your eeprom and later you can read.
The same eeprom structure is replicated in the commandline utility config file.
So every times you want to write/read an element of your micro eeprom, you can run commandline utility which serialize your input value, prepare it to be written on eeprom, and then ask the firmware to write this parameter on eeprom.
To read a value, the commandline utility just ask firmware to return a specific eeprom byte interval, then it deserialize the value recived.
Serialization and Deserialization functions provide the way to “convert” the commandline input as a valid atmega eeprom variable input, and viceversa.
All the conversion are made client (commandline) side, firmware side we have a small footprint library.
To make this works we have setup the same struct on firmware and command line side.

Firmware Library

  1. include the library in your main file
  2. setup eestruct on firmware and commandline config file read EESTRUCT file for further info
  3. init your eestruct eerpm (optional)
  4. in the main loop get a character from uart, and use avruartconfig main check function to check if the character you get is a library command main function also need a pointer to the eestruct variable and eeprom variable

Firmware Library, Arduino Notes
Import avruartconfig library in your libraries folder.
Make sure your serial connection is not resetting your arduino every times the serial port is open, look here for info: http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection

Commandline Utility
Using the commandline tool you can setup you atmega. Commandline utility implements the setup procol client side. Setup eestruct configuration files, read EESTRUCT file for further info.
The command line utility makes use of libconfig, so to build it, you need to add libconfig library to your linker (-lconfig for the library, -L../lib/_select_os to select the library directory).
Check that you have execution permission on commandline binary.AVR uartConfig - an atmega and arduino eeprom -config library

For more detail: AVR uartConfig – an atmega and arduino eeprom config library

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Accelerometer and Relay based Hand Gesture Controlled Wireless Home Automation System with ATmega32 using 433MHz RF
Accelerometer and Relay based Hand Gesture Controlled Wireless Home Automation System with ATmega32 using 433MHz RF

In this project, we will learn How to design an Accelerometer and Relay based Hand Gesture Controlled Wireless Home Automation...

Close
Scroll to top