Tag Archives: graphic lcd

Time Input Dialog for Graphic LCD

GUI Frameworks of all modern OS like Windows, Linux (Qt & GTK+), MAC etc have a concept of standard dialogs. For example all applications running under Windows shows the same file open dialog for selecting a file. Similarly their are standard dialogs for folder selection, colour selection, font selection etc. This concept has several advantages, and the most important is a easy user interface. Since the user is already familiar with file selection in one application, he/she can use file open dialog of any application. Building on the same concept our GUI framework for ProGFX (avr glcd driver) will too have many standard dialogs for common user interface. In this tutorial we will build the "Time Input Dialog" that helps programmer ask the user to input time. The time could be anything like :- "On" or "Off" time for a relay in a timer application. Alarm time in an alarm clock application. Period start time in a school bell application. And many others. The programmer just need to call the function. void ShowGetTimeDlg(uint8_t *h,uint8_t *m,uint8_t *s,uint8_t *am_pm) It takes four parameters hour, minutes, second and am_pm. All parameters are passed by reference(pointer actually), this is because the function modifies the value of those variables. It shows a dialog as shown below :- Time Input Dialog The user can use the […]

AVR Graphic LCD and Accelerometer Demo

Hello All!, Accelerometer applications are hot these days. So today I will show you how you can easily make a accelerometer add on for your AVR GLCD Board. Once you make this you can plug it into the AVR GLCD Board any time you wish to run a accelerometer based application on it. I will also provide a simple Open Source App for the AVR GLCD Board that can be used to test the accelerometer in no time. Developers can use this demo as a base for any accelerometer based app. Things you will need are A Veroboard or general purpose prototyping PCB (dotted one, not the line one). Female Burg Strips Female Burg Strip R/A MMA7260 Accelerometer Board Fig.: A Veroboard Marked for Cutting   Fig.: Veroboard Cut to Size   Fig.: Burg Strip Female   Fig.: Burg Strip Female Soldered to Veroboard.   Fig.: Burg Strip Female Soldered to Veroboard.   Fig.: 5 PIN Burg Strip Female Right Angle   Fig.: R/A Burg Strip Soldered.   Fig.: Just Ready!   Fig.: AVR GLD Dev Board   Fig.: Accelerometer Expansion Board Connected   Fig.: Accelerometer Connected.   Fig.: Accelerometer Connected with AVR GLCD Board   Fig.: AVR Accelerometer Ready! Connections     CONNECT TO GND Ground Supply Ground (EXP Port) VDD 3.3 V OUT SLEEP Sel2 G Select Pin2 […]

Interfacing Graphical LCD with AVR MCU – Part III

Hello Friends, Welcome Back. This is the continuation of our tutorial series on Graphical LCD Programming. Till now we have made the hardware for testing and setup avr studio project for graphical development. Now as our hardware and software is ready, its time to get our hands dirty by digging deep into ProGFX graphical programming. Introduction The graphical LCD is made up of a grid of pixels. Common resolution is 128×64. That means that their are 64 horizontal lines and each line has 128 pixels. These displays are monochrome that means each pixel can either be ON or OFF. ON pixels looks dark while OFF pixels are nearly invisible. The glcd has a graphic RAM where each bit in ram corresponds to one pixel on screen. You write to the graphic RAM to modify its contents and the screen will change accordingly. The LCD module offers just that much functionality. You can’t do much with that. Pixel Matrix of Graphical LCD You need a graphic library that takes high level commands like Graphic primitives like line,circles, rectangle etc Text Drawing Image/Icon drawing. Double buffering. and changes the graphic memory accordingly. These operation requires some advance algorithms (at least from beginners point of view!). So the graphic library will help you generate complex graphical output very easily. Pixel Addressing The horizontal […]

Interfacing Graphical LCD with AVR MCU – Part II

This tutorial deals with downloading and installing ProGFX graphic engine. ProGFX is a free and easy to use embedded graphic library that can control several display modules and can run on AVR, PIC and ARM MCUs. In this tutorial we will make a ProGFX graphical application with Atmel AVR ATmega32 MCU using AVR Studio and WinAVR (C Compiler). So lets begin. Downloading ProGFX engine. Please download the ProGFX engine from the following link. Download ProGFX v1.0 Installing ProGFX Engine. You need WinZIP to extract the files to your hard disk. Please extract it to root of any drive like "C:". Following Folders will be created. C:\progfx\include C:\progfx\lib Folders Created after extracting the ProGFX package Note that core of the engine is contained in two folders named "include" and "lib" but there may be some others folders too, like "Help" depending on your version of ProGFX engine. Creating a Graphical Project using AVR Studio. The basic tools required for developing with AVRs are Atmel Studio (Integrated development environment with integrated C compiler) eXtreme Burner AVR (to transfer program files to chip) These tools must be installed and set up correctly as described in the following tutorial. Creating "Hello World" project with Atmel AVR. Start AVR Studio and you will be presented with the following screen. Atmel Studio 6 Startup Screen The […]

Interfacing KS0108 based 128×64 Graphical LCD with AVR MCU.

Those how are building microcontroller based project for little long must have got bored with the good old character LCDs. Whether you are bored or your application require to present more data to the user in a better way, you need Graphic LCD. Character LCD Interfacing is quite easy so every one uses it, but when I comes to Graphic LCD you need a well written and powerful graphic library. Its not enough that you read the LCD datasheet and connect it your MCU and start sending data. Because the LCD just appears to be block of memory whose contents are directly visible on screen. The datasheet can only guide you how to access this memory. You just can’t do much by writing to the memory. The graphic library is a piece of software that has complex algorithms to render graphic primitives like line, rectangles, circles, images and more. It also helps load fonts and render text and numbers on screen. So it provide high level access to the LCD screen and applications can be written much more easily. While I was researching for graphic library for the GLCDs, I found some but I was not fully satisfied by any of them. So I began to write a clean, powerful, portable and easy to use library that can handle sever […]

Using LCD Module with AVRs

When you start working with LCD modules you will start feeling the real power of MCU and your imaginations will be touching sky you will wonder how many exciting a powerful gadgets you can create and that’s so very easily. LCD Modules can present textual information to user. It’s like a cheap “monitor” that you can hook in all of your gadgets. They come in various types. The most popular one can display 2 lines of 16 characters. These can be easily interfaced to MCU’s, thanks to the API( Functions used to easily access the modules) we provide. LCD interfacing is just fun ! Fig: A 16×2 LCD Module Buy LCD Modules Online In India   PIN Configurations. The lcd modules has 16 PINs for interfacing. The details are given below. LCD Module Pin Configuration 1 VSS (GND Supply) 2 VCC (+5V) 3 VEE (Contrast Adjust) 4 RS 5 R/W 6 E 7 DB0 8 DB1 9 DB2 10 DB3 11 DB4 12 DB5 13 DB6 14 DB7 15 LED + 16 LED –   Connection with ATmega8/ATmega168 etc. The lcd module can be easily connected to the any 28 pin AVR MCU like ATmega8/ATmega168/ATmega328 etc. The diagram below shows the LCD connection with AVR MCUs port pins. Fig: Connection with 28 PIN AVR MCUs Connect the required pins of […]