Author Topic: Graphics animation with HD44780 Char LCD :)  (Read 8265 times)

0 Members and 1 Guest are viewing this topic.

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Graphics animation with HD44780 Char LCD :)
« on: March 05, 2016, 02:18:22 pm »

Hi Guys :)
Source has been requested for this repeatedly, and I’ve gotten to splitting the graphics
routines 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? :D

Graphics:


Text Transitions:
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Graphics animation with HD44780 Char LCD :)
« Reply #1 on: March 05, 2016, 02:38:44 pm »
Very nice!
 
The following users thanked this post: matseng

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Graphics animation with HD44780 Char LCD :)
« Reply #2 on: March 05, 2016, 03:00:02 pm »
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"?
TEA is the way. | TEA Time channel
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Graphics animation with HD44780 Char LCD :)
« Reply #3 on: March 05, 2016, 04:50:22 pm »
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 :)

« Last Edit: March 05, 2016, 04:52:24 pm by @rt »
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Graphics animation with HD44780 Char LCD :)
« Reply #4 on: March 05, 2016, 05:55:04 pm »
Ah, I see. Thanks for the quick summary. I have a 20x4 display somewhere around here that might be fun to play with.
TEA is the way. | TEA Time channel
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Graphics animation with HD44780 Char LCD :)
« Reply #5 on: March 07, 2016, 06:06:15 am »
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/download

Goes in as the main.c file for Microchip C30 timer example for dsPic.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Graphics animation with HD44780 Char LCD :)
« Reply #6 on: March 07, 2016, 11:22:09 pm »
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.
TEA is the way. | TEA Time channel
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: Graphics animation with HD44780 Char LCD :)
« Reply #7 on: March 07, 2016, 11:30:56 pm »
What a completely pointless project.  I love it! :-)
 

Offline crispy_tofu

  • Super Contributor
  • ***
  • Posts: 1124
  • Country: au
Re: Graphics animation with HD44780 Char LCD :)
« Reply #8 on: March 08, 2016, 12:05:49 am »
Very cool.  :-+
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Graphics animation with HD44780 Char LCD :)
« Reply #9 on: March 08, 2016, 09:05:35 am »
Thanks for the compliments :)

bitseeker, I’m glad you got it working :) So 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 funny
Code: [Select]
main() {

sprintf(line1,”INITIAL LINE ONE    ”); // made for 20 char display so the four extra spaces should be left
sprintf(line2,”LINE TWO INITIAL    ”); // at the end until it’s tested with them removed
sprintf(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).
« Last Edit: March 08, 2016, 09:08:54 am by @rt »
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Graphics animation with HD44780 Char LCD :)
« Reply #10 on: March 08, 2016, 09:13:50 am »
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 window :)
Brek Martin.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Graphics animation with HD44780 Char LCD :)
« Reply #11 on: March 09, 2016, 01:07:43 am »
Thanks, Brek. I just figured I'd mention it in case anyone does a search.
TEA is the way. | TEA Time channel
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Graphics animation with HD44780 Char LCD :)
« Reply #12 on: May 06, 2016, 04:20:00 pm »
Haha.. I had just the right project to try a basic oscilloscope :D



Not 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf