Papilio LED Panel Project


mwcbrent

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.

Link to comment
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.

Link to comment
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.

Link to comment
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. 

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.