2011-01-25

GLCD 1.6.2 and Pinguino RTC, 128x64 Display and Temperature!


For this project I made a new version of KS0108 GLCD library, this supports now use of PORTD for display data, and we dont need use stdlib.h with it, this free some space for more nice programs.

Use of PORTD for data in/out, is vital because DS1307 real time clock (RTC) uses i2c and it, on PIC18, is placed on PORTB (default data port).

Use of PORTC for display control, this free PORTA for use of Analog PINs, I added it on 1.6.1 version.

GLCD 1.6.2 download here

For Analog Clock I used sin and cos, functions from math.h, but it uses about 6K and my Pinguino project got 100% of flash use, I made many changes on variables types and reuse someones, but need more memory for add pushbuttons for time setup, display date, load small font and do a graphical thermometer.

A idea, do my own version of sine and cosine.

From that I made a  flash array with all 16 float values of sines for seconds and minutes degrees, on first 90º, hours just multiply by 5, for have correct position. And calculate all others degrees using trigonometry.

sincos library, download here

And here GLCD_RTC_LM35_mem.pde file for use with all it.

4 comentários:

Unknown disse...

Hi,

I have an old Palm Treo getting dust. Ia was wondering if you have some experience in using (hacking) the LCD Display (taking it apart) and use it as a LCD Display interfacing with pinguino and your library?.

alejandro.dirgan@gmail.com

Regards

Alexis -Pax- Sanchez disse...

Hi, anunakin, I'm Alexis Sanchez, Venzuela, first thank you very much for the library to handle GLCD, and I used a few projects, now I have a problem I need to make some modifications to this that need to use port B data and D port for control ... this is possible? as I do? is a small modification for a specific application, use the beta verion of X rev 149 Ide under ubuntu 11.04.

Thank you very much for the orientacions you can give me to make this modification ...

Marcus Fazzi disse...

Hi Alexis!
You need take a look at
tools/share/sdcc/include/pic16/ks0108.h
file and do that changes...
Look at lines 70 to 74 there codes for specific pins...

You can find all codes in digital.c file... that is easy...

jumpjack disse...

No schematics?
No pinout?