Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC or AVR design decision on large RGB LED sign (SPI based with PWM and RAM?)

Status
Not open for further replies.

tdg8934

New Member
I have been working a few weeks on a large RGB LED sign project using a Parallax SX28 micro-controller chip. I can get basic data (smiley face) to display fine in either Red, Green or Blue LEDs on two smaller LED 16x8 RGB modules that are cascaded and will eventually be further cascaded a few dozen times to form a large "Full Color" outdoor sign in what is suposed to work in 24 - 36 bit color according to the datasheet.

I have been using Parallax micro-controllers like the Basic Stamp 2 and SX chips for over 3 years now in their PBASIC and SXB which are both B.A.S.I.C. language variants. The SX micro-controller has far more capabilities than the Basic Stamp 2 so that is what I have been developing my sign with. However, I am now at a point where I need PWM to get 256 shades of Red, Green and Blue LEDs to get the "Full Color" 24 or 36 bit display. Eventually I will need to find a way to add in video to the PWM to complete this project. But for today, I am having a very hard time finding a way to do PWM that apparently can be done on this type of a display but not as easy if at all on a Parallax SX chip. I also beleive when I move onto animation, the Parallax SX chip won't have enough internal RAM to support this project either.

So I am looking at moving to either a PIC or AVR or some other recommendation to complete this project. I have never worked with either of these micro-controllers and would start from scratch with only my Parallax SX chip background and experience to guide me.

Can someone tell me of a robust micro-controller that can handle a project like this? The RGB LED sign is comprised of cascading modules that are SPI based very similar to chips like the 74HC595. I can provide all data upon request to this project. The only inputs I have to the sign modules (which are RGB 16x8) are the following: R1A, R2A, R1B, R2B, G1, G2, B1, B2, CLOCK, LATCH, /OE and Ground. These signals are on a connector jack with input and output to the next modules. The 1 and 2 for the RGB just refer to 2 data streams (upper and lower halves of the modules for 64 bits per data stream).

I need to work in a BASIC language as I don't know C nor really want to learn Assembler. It needs to have an easy PWM module or format to implement for this SPI based sign. USB or Serial capability to a PC to eventually receive video RGB data would be needed. Plenty of RAM to handle RGB video formats of sign display data, arrays, etc.. is needed.

What are my options here - or what are other RGB sign manufacturers doing?
 

Attachments

  • DI-P20F1%20outdoor%20led%20display%20panel%20module.pdf
    497.4 KB · Views: 1,652
  • MBI5024 Datasheet- VA.02-CN.pdf
    478.3 KB · Views: 1,781
  • Absen-OF20V-Driver.pdf
    40.5 KB · Views: 1,118
  • Absen-OF20V-Lamp.pdf
    102.9 KB · Views: 970
Here is a couple of pics and a video showing what I have done easily with a Parallax SX28 micro-controller. But I can't get PWM figured out as it is not built into the Absen 16x8 modules.

What micro-controller is best at handling this project - if not the SX28 already?
 

Attachments

  • Absen_RedHalfSmiley 042.JPG
    Absen_RedHalfSmiley 042.JPG
    486.3 KB · Views: 1,016
  • SmileyBlueSeparated.JPG
    SmileyBlueSeparated.JPG
    394.5 KB · Views: 840
  • MOV01144.zip
    672.6 KB · Views: 1,187
  • DSC01147.jpg
    DSC01147.jpg
    130.5 KB · Views: 884
Wow, this sounds like a pretty complex project. How many panels are you planning on using for the final display? What frame rate do you need for the final video?

I'm not sure how you would use typical PWM to drive this since it is SPI. You'll just need to PWM the SPI data:
If your SPI clock is 25 MHz and you are only driving a single panel, you will have to clock in 64 data bits per 'frame'. So that means you can draw roughly 390,625 frames/second. Now if you set the output for a particular pixel high for half of those frames and low for the other half, that LED should appear to be half as bright.

There are similar LED drivers that have built-in PWM control, like the TLC5941 from TI. https://www.electro-tech-online.com/custompdfs/2008/10/tlc5941.pdf
With this chip, you program the 12 bit pwm value for each LED and it will automatically do the pwm for you. I'm not sure if this is on the MBI5024 that you are using. I couldnt find a good english datasheet, but I dont think it is.
With the built in PWM control, you will only need to update the LED drivers every time you change the frame. With the MBI5024 though, you would need to update the drivers 256 times per frame to get the necessary resolution.

Depending on the number of panels and video frame rate, I don't know if a microcontroller would cut it for this project. Theres a lot of processing that needs to be done. An FPGA would be ideal.

Hope this helps.
 
These 16x8 RGB modules have 2 data streams for 64 bits each on the upper 4 rows and lower 4 rows. Actually, the attached datasheet will show this better (bottom of 2nd page). Its kind of a zigzag pattern on each of the 4 rows. Currently this pictures show 2 of these Absen RGB modules cascaded.
24 of these modules make up a cabinent and many more of these cabinents make up an outdoor sign.

I started this new thread to answer the question if I need to look in another direction or not (e.g. can PWM be done with SPI using my current SX28 or do I need to look at a PIC or AVR micro-controller - or possibly FPGA now).

I'm not sure how you would use typical PWM to drive this since it is SPI. You'll just need to PWM the SPI data:
If your SPI clock is 25 MHz and you are only driving a single panel, you will have to clock in 64 data bits per 'frame'. So that means you can draw roughly 390,625 frames/second. Now if you set the output for a particular pixel high for half of those frames and low for the other half, that LED should appear to be half as bright.

Can you explain this calculation and how this might be done with 128 bits per module (not 64)?

The only signals on this module is: R1A, R2A, R1B, R2B, G1, G2, B1, B2, CLOCK, LATCH, /OE, GROUND. There is no PWM built in. It uses MBI5024 LED drivers which act as simple SPI type chips like the 74HC595 chips just with 16 outputs.

Note that there are A and B and 1 and 2 on the input signals. This refers to the upper and lower data streams of 64 bits each.

These modules are cascaded and connect to a Receiving board which then through Ethernet get connected to a "Full Color" Display Controller PCI card in the PC. I have attached the user installation manual with a little bit of information about the "receiving card" which is what I am trying to either replace or interface between. Not sure what the possibilities are with this.

The attached installation manual barely mentions the receiving card. But this installation manual at least has a picture of it on page 17.
https://www.ledigital.net/Absen%20Installation%20manual.pdf

"If" I do need to move to an FPGA, wheres a good place to start (0 experience with FPGA's but I am an Electrical Engineer)
 

Attachments

  • DI-P20F1%20outdoor%20led%20display%20panel%20module.pdf
    497.4 KB · Views: 1,098
  • P20 OutDoor Full color LED Screen User's Manual.pdf
    1.2 MB · Views: 3,507
A few points

a PWM module WILL NOT help for this project.

there are 8 data streams(one for each colour)x2 (according the datasheet) 4 for the top module and 4 for the bottom module which are clocked in simultaniously.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top