Graphics animation with HD44780 Char LCD :) - Page 1
Forum section: electronics / general

author: @rt
author_rank: Super Contributor
timestamp: March 05, 2016, 02:18:22 pm
content: Hi GuysSource has been requested for this repeatedly, and I’ve gotten to splitting the graphicsroutines out of the larger program they were written for.In fact, the text transition source is ready to go now.So when is a character display a graphics display?Graphics:Text Transitions:

author: Kilrah
author_rank: Unknown
timestamp: March 05, 2016, 02:38:44 pm
content: Very nice!

author: bitseeker
author_rank: Super Contributor
timestamp: March 05, 2016, 03:00:02 pm
content: Source may have been requested repeatedly, but this is the first time I've seen this level of animation on a character display. Very cool!Is the animation completely arbitrary (i.e., pixel-level control from code) or are all the frames pre-defined "characters"?

author: @rt
author_rank: Super Contributor
timestamp: March 05, 2016, 04:50:22 pm
content: Hi, It was on Hackaday a while back and got some exposure there.The graphics and text transitions are very different programs.ie. the source for one would not be of much help for someone writing the other.The graphics is pixel level double buffered display, and arbitrary drawing,where the LCD RAM of course provides the video RAM, and the drawing buffer is in the micro.There is also a fairly complete 2D library for lines, boxes, circles, eclipse, etc.The custom characters are rewritten for every frame.Much earlier I got this done which looks nicer, but revisited it when I started writing for dsPic,and had floating point math to do point rotation, etc. ... which is why there’s a lot of rotation in the later one

author: bitseeker
author_rank: Super Contributor
timestamp: March 05, 2016, 05:55:04 pm
content: Ah, I see. Thanks for the quick summary. I have a 20x4 display somewhere around here that might be fun to play with.

author: @rt
author_rank: Super Contributor
timestamp: March 07, 2016, 06:06:15 am
content: Hopefully this SourceForge account worked, and this should be the main.c file for text transitions.It can be blocking or non-blocking.https://sourceforge.net/projects/lcd-transitions-hd44780/files/LCD_Transitions.txt/downloadGoes in as the main.c file for Microchip C30 timer example for dsPic.

author: bitseeker
author_rank: Super Contributor
timestamp: March 07, 2016, 11:22:09 pm
content: Thanks, rt. Download worked fine. Looks like there are some fancy (non-ASCII) quote and apostrophe characters in the four sprintf() at the beginning of main(). Doesn't occur elsewhere.

author: Delta
author_rank: Super Contributor
timestamp: March 07, 2016, 11:30:56 pm
content: What a completely pointless project. I love it! :-)

author: crispy_tofu
author_rank: Super Contributor
timestamp: March 08, 2016, 12:05:49 am
content: Very cool.

author: @rt
author_rank: Super Contributor
timestamp: March 08, 2016, 09:05:35 am
content: Thanks for the complimentsbitseeker, I’m glad you got it workingSo I can forget about it and go on with the next bit.The non-ascii, so long as it’s the quotes that belong there I’m sure everyone will figure it out who tries.It was written in MPLAB, so I wouldn’t have expected anything funnyCode:main() {sprintf(line1,”INITIAL LINE ONE ”); // made for 20 char display so the four extra spaces should be leftsprintf(line2,”LINE TWO INITIAL ”); // at the end until it’s tested with them removedsprintf(line8,” NEW LINE ONE ”);sprintf(line9,”!!!!!!!!!!!!!!!! ”);//Some new inserted chars just now.. “”””””’’’’’ ‘’’’ ‘’’’ Maybe a Mac OS thing?If you got it sorted so easily you’d probably easily figure out how to interleave it with other program code rather than blocking (if needed).

author: @rt
author_rank: Super Contributor
timestamp: March 08, 2016, 09:13:50 am
content: Anyone from YouTube or elsewhere I’ll send here now BTW, the next code link will end up here too.So... I give up all rights to both sources (when the next one is posted) Public Domain for use as is, or with any modification.If you make a million out of a commercial product though, the least you could do is give me a sitting down job at a desk with a windowBrek Martin.

author: bitseeker
author_rank: Super Contributor
timestamp: March 09, 2016, 01:07:43 am
content: Thanks, Brek. I just figured I'd mention it in case anyone does a search.

author: @rt
author_rank: Super Contributor
timestamp: May 06, 2016, 04:20:00 pm
content: Haha.. I had just the right project to try a basic oscilloscopeNot bad for a 16F628A. The timing of the output for the relay has priority to drawing,and is done in the same timer interrupt routine that counts 100th of a second.Other than in pulse mode, there’s nothing to tie a rising edge to the beginning of a second so it’s correct for the waveform to walk.Cheers, Brek.