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.
Postar um comentário