mwcbrent Posted March 26, 2014 Report Share Posted March 26, 2014 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/12584I 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 More sharing options...
Jack Gassett Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
mwcbrent Posted March 29, 2014 Author Report Share Posted March 29, 2014 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 More sharing options...
Jack Gassett Posted March 29, 2014 Report Share Posted March 29, 2014 What I do is get the data sheet of both chips and then compare Link to comment Share on other sites More sharing options...
Jack Gassett Posted March 29, 2014 Report Share Posted March 29, 2014 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 More sharing options...
Jack Gassett Posted March 29, 2014 Report Share Posted March 29, 2014 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.cLook at line 364 Link to comment Share on other sites More sharing options...
mwcbrent Posted March 29, 2014 Author Report Share Posted March 29, 2014 Thanks a ton! Link to comment Share on other sites More sharing options...
alvieboy Posted March 29, 2014 Report Share Posted March 29, 2014 mwcbrent: If you send me the datasheet I can write a VHDL+wishbone+zpuino controller for it. Link to comment Share on other sites More sharing options...
mwcbrent Posted March 29, 2014 Author Report Share Posted March 29, 2014 Thanks Alvie, I'm not sure which datasheet you would need. For the panel itself? I admit I don't know enough to make the necessary timing changes to this library so it will work. Would love to learn more about how to understand the parameters at work here. Any recommendations on beginner resources? Link to comment Share on other sites More sharing options...
alvieboy Posted March 29, 2014 Report Share Posted March 29, 2014 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 More sharing options...
mwcbrent Posted March 29, 2014 Author Report Share Posted March 29, 2014 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. Link to comment Share on other sites More sharing options...
alvieboy Posted March 30, 2014 Report Share Posted March 30, 2014 Is this the hardware ? http://valentfx.com/wiki/index.php?title=RGB_LED_Panel_Driver Link to comment Share on other sites More sharing options...
mwcbrent Posted March 30, 2014 Author Report Share Posted March 30, 2014 Yes, it is. Great find! Link to comment Share on other sites More sharing options...
hamster Posted March 30, 2014 Report Share Posted March 30, 2014 I got to get me one of them panels... they look nice! Link to comment Share on other sites More sharing options...
alvieboy Posted March 31, 2014 Report Share Posted March 31, 2014 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 Link to comment Share on other sites More sharing options...
mwcbrent Posted April 1, 2014 Author Report Share Posted April 1, 2014 I tried a few ways to get this done. I even tried putting the board on my flatbed scanner! I'll keep you posted when I get a good visual captured. Again, appreciate your help. Link to comment Share on other sites More sharing options...
alvieboy Posted April 1, 2014 Report Share Posted April 1, 2014 I guess if you can just write down the chip names it will be OK Link to comment Share on other sites More sharing options...
mwcbrent Posted April 1, 2014 Author Report Share Posted April 1, 2014 OK! So most of the chips say: CHIPONEICN2026CFA.CE8M13.1 others (smaller ones) say: 49533I1H one outlier is: CHIPONEICM74HC138H.CE8F17.1 The biggest chip on it says: CHIPONEICN74HC245H.CE8E1L.1 Anything else I should grab on it? Link to comment Share on other sites More sharing options...
alvieboy Posted April 2, 2014 Report Share Posted April 2, 2014 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 chipICN2026 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> 20VApplication• 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 More sharing options...
mkarlsson Posted April 2, 2014 Report Share Posted April 2, 2014 I found this (maybe a different brand): http://www.tme.eu/en/Document/b79eb201a2b4ac08588ea629c1381be2/sct2026.pdf Link to comment Share on other sites More sharing options...
mwcbrent Posted April 2, 2014 Author Report Share Posted April 2, 2014 The 74HC138 is the column decoder. There should be four of them, is this correct ? I have identified two of them on the board. Link to comment Share on other sites More sharing options...
alvieboy Posted April 3, 2014 Report Share Posted April 3, 2014 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 Link to comment Share on other sites More sharing options...
alvieboy Posted May 11, 2014 Report Share Posted May 11, 2014 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 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 More sharing options...
Jack Gassett Posted May 12, 2014 Report Share Posted May 12, 2014 That looks awesome! Link to comment Share on other sites More sharing options...
mwcbrent Posted May 12, 2014 Author Report Share Posted May 12, 2014 So awesome, sorry I've been catching up with work. I hope to post my panel soon as well! Thanks for your help Alvie! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.