mwcbrent

Papilio LED Panel Project

Recommended Posts

Hi All,

I am new to the world of FPGAs and have really enjoyed learning more. I recently purchased the Papilio 500k + Logic Start mega wing and worked my way through a few tutorials. My impression of is that there are a lot of ways to accomplish the same thing using both VHDL and code versus just code.

I recently purchased and hooked up this panel:

https://www.sparkfun.com/products/12584

I wanted to build a program to display messages. I've seen a few projects where this is done but am not sure how to proceed. The hook up guide spark fun has includes libraries for Arduino that can be used but do they need to be ported? If so, to what?

I'm jumping ahead of my capability level since I'm pretty excited about this project so pardon any silly questions.

Share this post


Link to post
Share on other sites

Hello,

 

If you want to port the library from Sparkfun then you will want to just try to run the library with the AVR8 or the ZPUino and see where it throws up errors. If it just uses GPIO then it could work with no issues. 

 

The AVR8 is based on the atmega103 instead of the atmega328 used in the Arduino. The differences are usually pretty minor, just in names and such, so if the library uses a atmega328 timer then you usually just need to change the timer name to match up with the timer name of the atmega104. 

 

With the ZPUino you would have to do the same but you would want to look at the ZPUino hardware guide and see how things like timers work in the ZPUino world.

 

We can help out if you post your findings here.

 

Jack.

Share this post


Link to post
Share on other sites

Thanks for the reply Jack.  I'm back at it and you are right.  

 

WGM11, WGM13, WGM12, TIMSK1, TIFR1 aren't lining up. 

 

Any ideas on where I could find the atmega103 equivalent for these constants?  Any guidance would be appreciated.  Thanks!

 

I did find this document which I suspect may have the remnants marked as obsolete.

Share this post


Link to post
Share on other sites

For example, looking at the atmega328 datasheet:

 

We can see that the WGM10-13 bits control the "Waveform Generation Mode" for the timer. So we then look at the code and see what waveform mode is being configured. Then we look at the datasheet for the atmega103 and look at the timer section and see how what registers the atmeg104 uses to configure the type of waveform it generates. There is usually some similar type of registers with just a different name. Or maybe the atmega103 only has one type of waveform it generates... You then modify the library accordingly, and if you want to keep compatibility then you add ifdef statements in the code that check if the chip type is atmega103. You can look in hardware/core/papilio/avr8 for examples of how that works.

 

Hope that helps,

 

Jack. 

Share this post


Link to post
Share on other sites

Woah, please note that I've been saying the AVR8 is based on the atmega104, it is actually the atmega103! Sorry about that.

 

Here is the datasheet for the atmega103:

http://www.atmel.com/Images/doc0945.pdf

 

And here is an example of how to check for the atmega103 in code:

https://github.com/GadgetFactory/ZAP--ZPUino-Arduino-Papilio--IDE/blob/master/hardware/papilio/avr8/cores/arduino/pins_arduino.c

Look at line 364

Share this post


Link to post
Share on other sites

It seems that there is no datasheet for the product.

 

Since you're doing FPGA, I really suggest to design the driver in VHDL, and have the software to only update the RGB value itself.

 

It's not that hard. I can give it a try, but you'll have to do all the testing cause I don't have a panel like that one.

Share this post


Link to post
Share on other sites

That would be most excellent.  I would love to learn more VHDL.  I will continue to see if I can dig up a data sheet however feel free to post any VHDL solution and I will give it a shot.  Thank you for the offer.

Share this post


Link to post
Share on other sites

mwcbrent: I wonder if you can send me some closeup photos of the chips on the back of the panel. That will allow me to check up all the timings on their individual datasheet.

 

Best,

Alvie

Share this post


Link to post
Share on other sites

I tried a few ways to get this done.  I even tried putting the board on my flatbed scanner!   :lol:

 

I'll keep you posted when I get a good visual captured.  Again, appreciate your help.

Share this post


Link to post
Share on other sites

OK!  So most of the chips say:

 

CHIPONE

ICN2026CF

A.CE8M13.1

 

others (smaller ones) say:

 

4953

3I1H

 

one outlier is:

 

CHIPONE

ICM74HC138

H.CE8F17.1

 

The biggest chip on it says:

 

CHIPONE

ICN74HC245

H.CE8E1L.1

 

Anything else I should grab on it?

Share this post


Link to post
Share on other sites

Thanks.

 

The 2026CF is a 16-channel LED driver, but I cannot find a datasheet for it. How many of these are in the board ? The only info I found is that it is supposed to handle 30MHz.

 

Google Translate for this chip (it's chinese):

 

"LED display driver chip

ICN2026 is designed for LED module and display design driver IC, with 16 constant current output drive capability. Can choose different external resistor on the output current size of any adjustment, precise control of LED luminous intensity. ICN2026 interior design of the 16-bit shift register and latches, serial input data can be converted into parallel output data format, via external enable signal controls the LED off. Meanwhile the internal use of the precise current control technology allows inter-chip error is less than ± 2.5%, inter-channel error is less than ± 2.3%.

Features:
• 16-bit constant current source
• 3.0 - 5.5V input
• Output current range 3 - 45mA
meet the 30MHz clock frequency
channel current consistency between ± 2.3%
Consistency between the current chip ± 2.5%
•> 8KV HBM ESD
current output withstand voltage> 20V

Application
• LED display

"

 

 

74HC245 is a bus transceiver, and does not make much sense here because it's bidirectional...

 

The 74HC138 is the column decoder. There should be four of them, is this correct ?

 

This looks trivial if we manage to keep the 30MHz rate specified in the driver chip.

Share this post


Link to post
Share on other sites

Ok, I think we can come up with something to drive that and have a full RGB output on each of the leds.

 

Can you email me so we can synchronize ?

 

Alvie

Share this post


Link to post
Share on other sites

Ok guys,

 

we managed to get the panel up and running, with 8-bit PWM for each of the leds, and supporting up to 2 panels. Clock is 16MHz, it can go a bit higher I think. Refresh rate is 60Hz. We're doing 2048 LEDs, with 256 levels, hard to get past this refresh rate with the full 256 levels.

 

https://plus.google.com/116743180718434174062/posts/G72Azmu9UtZ

 

godofredo-rgb2.jpg

 

It's a fantastic panel. I wonder if I can put Zetris working on it, with a remote like Wii Nunchuck.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now