root@fandigunawan

June 18, 2008

HD44780’s stdio bind for WinAVR

Last time I found out that stdio.h functions is very useful but then it is lack in interfacing. Therefore while I’m doing my project with HD44780 (LCD with 16×2 characters) it is necessary to bind the LCD functions to stdio.h such as printf() function.

The result of an example : printf(“Line1\nLine2”);

Download the code here :

http://fandigunawan.googlepages.com/hd44780_stdio_bind.zip

LCD Nokia 3310 (PCD8544) Driver in WinAVR(avr-gcc)

LCD Nokia 3310 is widely known to be monochrome graphic LCD targeted for embedded devices. It is a 84×48 pixels LCD that can be interfaced trough SPI protocol. This is the detail of the LCD’s pins configuration.

Taken from : http://www.myplace.nu/mp3/images/nokia_lcd_small.jpg

The driver is targeted for avr-gcc or WinAVR.

In case you need to recompile to suit your need, please download the following tools :

This design is targeted to be clocked at 4 Mhz, you may change it by modifying makefile or change the configuration of clock in AVR Studio. You can use avrprog or Pony Prog to program your fuse bits (CKSEL) or you may recompile the code to suit your clock speed.

New version :

0.2.6 rev 1 (new)

A silly mistake I made in header file. Please update your version 0.2.6 to 0.2.6 rev 1.

 http://fandigunawan.googlepages.com/lcd_pcd8544_v026rev1.zip

* + Header file (pcd8544.h) PIN definition fixed

0.2.6 (dont use this)

 http://fandigunawan.googlepages.com/lcd_pcd8544_v026.zip

* + Optimization using Memset and Memcpy
* + Bug fix and sample program reviewed
* + Commented <stdio.h>

Many thanks for Jakub Lasinski for code review and suggestions.

0.2.5

http://fandigunawan.googlepages.com/lcd_pcd8544_v025.zip

Changelog from version 0.2.4

* Version 0.2.5 ( December 25, 2008 ) x-mas version
* + Boundary check is added ( reported by starlino on Dec 20, 2008 )
* + Return value is added, it will definitely useful for error checking

0.2.4 rev 1

http://fandigunawan.googlepages.com/lcd_pcd8544_v024rev1.zip

Changelog from version 0.2.4 :

* Version 0.2.4 revision 1 ( December 25, 2008 )
* + Some of boundary checking added (reported by starlino) and this is actually as a part of version
* 0.2.5 but I think i need to add it to this version also.

Old version

 http://fandigunawan.googlepages.com/lcd_pcd8544.zip

Note : If you find out my code working in your design please let me know about it.

——————————————————————————–

Generating hex from BMP using BMP2HEX by Jakub Lasinski :

You will need .NET framework 2.0 to use this application.

 http://fandigunawan.googlepages.com/bmp2hex.zip

———————————————————————————————–

As a request from AGA33, I have posted the picture of the project, schematic as well as the project source code of my thesis (yes, my thesis using old version driver).

The project was clocked using internal oscillator at 4 Mhz, see AVR datasheet regarding to internal clock setting.

The corresponded source code of my thesis.

http://fandigunawan.googlepages.com/water_level_monitor.zip

[Updated May 3, 2009]

Credit

Many thanks to : http://www.myplace.nu/mp3/images/nokia_lcd_small.jpg for awesome PCD8544 picture. Thanks for visitor who told me about this picture credit. Actually I don’t remember actually where I picked the picture since it has been more than a year ago and I used Google image search engine. Actually I don’t remember removing the label myplace.nu from the image but it is fine for me. If you have any problem with my post or project please kindly tell me, I can’t do anything right without your feedback. Thanks.

(more…)

Create a free website or blog at WordPress.com.