LED dot matrix scrolling message w/ soure code

Works done? Proud of it? Show off here! Let's see what you've built can help inspire others.

LED dot matrix scrolling message w/ soure code

Postby takao21203 » Mon Feb 24, 2014 9:57 am

DSC01254-2.jpg

HI, I have not abandoned the forum.

Last year actually I have been in Tokyo and Osaka.

Over the years i have built some LED matrix scrolling message circuits.
You know the problem maybe- there are many different displays and controller chips.
Each time, the source code needs to be changed.
Display size can be different too.

I have worked out a solution!

The LED matrix configuration is defined with a pin order table.
IO is done in random order- pin port address & bitmask are read from a table for each bit.

A display bitmap buffer is used, all of the scrolling message is precomputed. So a proportional font can be used! This makes it possible to have a 5 pixel high font.

Once you understand how the tables work, you can port it to any controller, you can use any LED matrix modules, even self-made matrix. You can cconnect to random IO pins.

1. It is of course much slower than full port writes. 8 MHz is enough to update 15x5 flicker free
2. It is not yet moving the view window (but that is trivial only needs a few lines code)
3. Midrange PICs only havee 80 bytes continuous RAM. So the message cant be so long

All is included here, with source code: http://aranna.altervista.org/dragonsnes ... 0078125000
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe

Re: LED dot matrix scrolling message w/ soure code

Postby sich » Mon Feb 24, 2014 12:18 pm

Welcome back to Cytron's forum!

Thanks for sharing and it would be real nice if you're aiming at creating a library for the function so users may find it easy to integrate it into their projects and thus you get the credits ;)
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: LED dot matrix scrolling message w/ soure code

Postby takao21203 » Mon Feb 24, 2014 7:27 pm

Thanks for comment. You suggest to create a library? Encapsulating some of the functions?

I have divided scrolling message into independent code pieces:

Component definition (pinout)
IO port definition (PORT access scheme)

Scroll generation (generation of a bitmap in RAM)
Line refresh (using the IO tables to output one line)

There are a lot of tables and they must be created for a specific chip, and a specific display.

One important thing is, such tables can be stored in RAM, and loaded from external memory such as EEPROM. But it is much slower to do random IO of course.

How can I put it into a library in a way that makes sense?

Really large matrix needs independent refresh controllers for each small sections.
I tried a large number of shift registers, about 30, but there was a hardware error on the circuit board I wassn't able to find.

I have by the way rebuilt my large 768 LEDs matrix drive circuit- now using 8x 16f59 controller.
Still a lot of work to do. I am working on this right now.

Since a few months, all my stuff is on a wordpress blog, with tags and categories. And today I added google+ to the sidebar!
Deleted my old youtube channel, some nice circuits, but most of them not so good in the end.
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe

Re: LED dot matrix scrolling message w/ soure code

Postby ober » Tue Feb 25, 2014 8:50 am

Yes, thanks for sharing!
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: LED dot matrix scrolling message w/ soure code

Postby takao21203 » Wed Mar 05, 2014 6:25 pm

I have made modifications, of course the text is now scrolling.

And i need to use 2 RAM sections, since 16F PICs can only access 80 bytes.

Maybe I should update the webpage, but it's also not very difficult to make the changes.
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe


Return to Project Showcase

Who is online

Users browsing this forum: No registered users and 1 guest

cron