![]() | ![]() | ![]() |
| | #31 |
|
Ok, I have attached a few pictures, that is one module (16x8) enlarged for clarity, i have also attached the same picture divided into its constituent parts, eg RED, GREEN, BLUE. I am making the assumption that boths reds need to be on together. On the pictures i have circled an area (4x4) for bottom part amd (4x4) for the top part. Below is that section converted to binary (starting at the bottom right, working left and up as in the datasheet, but thinking about it now it probably needs reversed due to the way data is SHIFTED in, but it wont affect the explanation) Code: R1A: 91,124,109,111,91,79,88,113,58,52,157,242,64,92,111,95 R1B: 91,124,109,111,91,79,88,113,58,52,157,242,64,92,111,95 G1 : 78,109,95,98,86,73,73,76,64,52,148,227,79,97,105,81 B1 : 87,116,94,89,82,73,78,95,78,62,151,224,118,117,107,72 R2A: 110,153,84,153,114,146,136,146,107,144,255,106,149,142,170,94 R2B: 110,153,84,153,114,146,136,146,107,144,255,106,149,142,170,94 G2 : 128,154,73,136,123,136,118,128,105,126,242,96,143,124,160,98 B2 : 176,175,69,118,162,147,108,108,126,124,232,87,143,112,158,110 to reproduce the image: this is psudo code: in a basic type syntax Code: For X=0 to 255 (this is the brightness)
For Y=0 to 63 (This is the Rows) (only 16 shown above cos i dont have the time)
load in the colum (y) from the array above
if R1A <= X then OUTPUT_R1A = 1 else OUTPUT_R1A = 0
if R1B <= X then OUTPUT_R1B = 1 else OUTPUT_R1B = 0
if G1 <= X then OUTPUT_G1 = 1 else OUTPUT_G1 = 0
if B1 <= X then OUTPUT_B1 = 1 else OUTPUT_B1 = 0
if R2A <= X then OUTPUT_R2A = 1 else OUTPUT_R2A = 0
if R2B <= X then OUTPUT_R2B = 1 else OUTPUT_R2B = 0
if G2 <= X then OUTPUT_G2 = 1 else OUTPUT_G2 = 0
if B2 <= X then OUTPUT_B2 = 1 else OUTPUT_B2 = 0
clock the latch
next y
delay 65uS (obviously this would be smaller as there is no account for overhead)
next x
can you see from that code snippet how the colours are achieved? output_XXX is an outpin connected to the relevent pin on your module
__________________ There will come a day when PICs will rule the world! | |
| |
| | #32 |
|
This looks very interesting I will try and convert my SXB program into this format tonight. The DATA statements I have in my original SXB program are the lower and upper halves (for the upper and lower data streams) of a Smiley face and there are 2 sets because I have 2 cascaded 16x8 modules. Where did you get the data information from for your data below? Code: R1A: 91,124,109,111,91,79,88,113,58,52,157,242,64,92,111,95 R1B: 91,124,109,111,91,79,88,113,58,52,157,242,64,92,111,95 G1 : 78,109,95,98,86,73,73,76,64,52,148,227,79,97,105,81 B1 : 87,116,94,89,82,73,78,95,78,62,151,224,118,117,107,72 R2A: 110,153,84,153,114,146,136,146,107,144,255,106,149,142,170,94 R2B: 110,153,84,153,114,146,136,146,107,144,255,106,149,142,170,94 G2 : 128,154,73,136,123,136,118,128,105,126,242,96,143,124,160,98 B2 : 176,175,69,118,162,147,108,108,126,124,232,87,143,112,158,110 I see no mention of the /OE line. Is this just turned on (active low) when the data gets latched - as it does in my original SXB program - OR was this missed and something special happens to it? Thanks - I will share my results tonight! | |
| |
| | #33 |
|
that table is made from the grey values for each of the RED,GREEN,BLUE channels from the original picture (the colour one) - the grey value represents how bright that led needs to be on each channel to get the desired colour. I noticed a problem with my code sample, although it does have the right amount of 'on' time, it is in one chunk, when it should be spaced with the off time. Its a function of 256/colour value - i had it in my mind on the drive home - but ive lost it now. Will think about it more tomorrow ![]() do you understand my concept now? The /OE i guess just turns the display on or off - i havn't looked into it - but thats not used for my method of drawing the display
__________________ There will come a day when PICs will rule the world! Last edited by SMUGangsta; 22nd October 2008 at 10:00 PM. Reason: added reply to /oe question | |
| |
| | #34 |
|
I tried to incorporate your code idea into my original SXB program which is attached as a TEXT file so you can view it with Notepad or something. I have commented out unused or modified original SXB program code. This program does nothing but display a smiley face in red, red2, green and blue LEDs. See attached picture. See how they are offshifted for the different LED colors. I tried adding a PAUSEUS 0.020 between the CLOCK and ST statements and varried the amounts dramatically and saw no differences. I also adjusted the differences of the PAUSEUS after the OE = 0 and this sort of did something with brightness (low number like PAUSEUS 1 was dim and higher number like PAUSEUS 100 or more was brighter). However when trying to add a nested loop caused such an increase in delay that no changes in the brightness PAUSEUS statement made any difference (just stayed bright). Anyway - perhaps you can modify the working SXB program to see how I am acheiving the SPI routine. Let me know...Thanks! | |
| |
| | #35 | |
| Quote:
Also, as you're looking at solutions for full RGB color control, consider this; You're basically talking about sending 512 bits of data (64 bytes) to the display latches 256 times during a 16.67 msec period. That's 16,384 bytes for a 24 bit color 'still' frame, assuming redundant red LEDs. If you can send 64 bytes to the latches every 65.1 usecs (1/256th of the frame rate) and you can buffer a 16KB 'still' frame in Flash you're in good shape. Otherwise, you're looking at compressing the 'still' image, perhaps using 2048 bytes of 0..255 LED PWM values, and building each 64 byte update stream from that but I doubt you're going to be able to do that within 65.1 usecs. I can't help wondering if 8 bits per color (256 colors) might be a better target? Good luck. Mike Last edited by Mike, K8LH; 23rd October 2008 at 01:52 PM. | ||
| |
| | #36 |
|
Mike, Thanks again for your input! The more I am working on this project, the more I beleive that the SX28 is just not the right choice for this due to limitations in PWM, RAM, etc. I am "possibly" wanting to look at PIC or AVR or other semi-easy BASIC methods to better acheive this goal. Any ideas? I just like the SX28 as I know it the best and a bit hesitant on starting from scratch with a new micro-controller to learn again. Thanks, Tim | |
| |
| | #37 |
|
Hi Tim, Yeah, I saw your other thread. Not sure what microcontroller to suggest. What you're trying to accomplish is certainly "pushing the envelope" and I can't imagine trying to do it in BASIC. Good luck. Mike Last edited by Mike, K8LH; 23rd October 2008 at 06:52 PM. | |
| |
| | #38 |
|
Mike, I don't know if it really is pushing the envelope. For just sending out SPI based data, it is a piece of cake. The problem has come in when trying to get shades of Red, Green and Blue LEDs on these SPI based modules - or what I beleive is refered to as PWM. We know that it is possible to get all of this done. Normally these modules are daisy chained together in the dozens or more. The output jacks connect to the input jacks on the incomming modules next in line. However, the first input jack normally goes to a "receiving board". I don't have this board but trying to have my client ship one to me to look at. This may be the missing link in how this is done. This board then sends out the R1A, R2A, R1B, R2B, G1, G2, B1, B2, CLOCK, LATCH, /OE and GND signals to the first input jack. Some kind of controller is on this "receiving board" to do this PWM. It also has Ethernet and would then normally goes to a "Full Color" controller card that plugs into a PCI slot on a PC. It has Ethernet input jacks, DVI connectors to plug into the PC's DVI connector and so on. I am trying to (I guess) tap into the these modules and somewhat replace the "receiving board" and maybe the "Full Color" controller card. Since simple SPI data is being pushed through the cascaded modules, it is very possible to do this with a micro-controller. However, it may need something more robust than a Parallax SX28 or SX48 chip for PWM, RAM, Eithernet(?), other features, etc.. This is where my delema is. I hope I have explained it better now. | |
| |
| | #39 |
|
hi, do you mind if I ask how much these modules are - and where from, as itd be so much easier if i had one to play with - and who knows id quite like a video wall ![]() have you looked at microElectronica BASIC, it is a basic compiler for the pic, would let you stick to a language your used too. but for the time critical bits you probably need some inline assembler. i assume your sx is something like a basic stamp, where the code is interpreted on the chip. mE compiles to native pic code. you can download a demo from their site, limited to 2k program on the demo - which is quite big.
__________________ There will come a day when PICs will rule the world! | |
| |
| | #40 |
|
There is NO pwm on these modules, the only way to set the brightness of each individual led (colours) is to turn them on and off in quick succession through your spi. your spi can run at up to 25MHz, so thats more than enough, so its basically down to the software.
__________________ There will come a day when PICs will rule the world! | |
| |
| | #41 |
|
These Absen-OF20v 16x8 pixel RGB modules were given to me to develop with from my client as a test to see if it can be done with a micro-controller to replace some bad software interfaces originally designed my Chinese manafacturers. Since the Receiving card and "Full Color" controller card interfaced to the modules and PC, it was asked of me to find another way to eventually have better software (written by his software developers), talk to my micro-controller and associated hardware. If you go to this link you will see the modules arranged in 6x4 configurations in cabinets at about $2900 each. Many cabinents are then cascaded to make up the large display signs you see outdoors. This is not my client but just another US distributor I found on the web: AbsenUSA LED Displays The "Full Color" LED Display controller PCI card is also shown but not the "Receiving Card". This is only referenced in the Installation manual. This could be the key element here. I bought microElectronica BASIC with an EasyPIC 4 (now up to the EasyPIC 5) about a year ago and I returned it because I was confused with it intially and saw the BASIC was not as large in commands as SXB was for the Parallax SX chips that I was currently using. I can probably go back to this if you think this is the "right" way to go on this with available PWM, RAM, etc. http://www.mikroe.com/en/tools/easypic5/ Parallax SXB for their SX chips is far more advanced than their BASIC STAMP 2's. You can insert in-line assembly (which I don't know too well) as well as a large command of BASIC like SXB statements. Can the PIC meet this challenge or stick with my current comfort zone of experience with the SX chips? http://forums.parallax.com/forums/attach.aspx?a=14085 | |
| |
| | #42 |
|
id stay in your comfort zone at least until you get one of the modules working properly, then try 2 - and when you run out of 'time' sending your commands to the module, then upgrade to something faster/more suitable.
__________________ There will come a day when PICs will rule the world! | |
| |
| | #43 |
|
Currently as shown in the pictures. I have 2 modules cascaded together as my code reflects this for a full 2 * 16x8 OR 16x16 size display. It may not be evident when looking at the pictures that this is acually 2 of them. See attached pictures. But the concern still is how do I do PWM with this board an an SX chip? | |
| |
| | #44 |
|
Not likely a simple SX series microcontroller can replace the somewhat more complex $800 PCI controller seen in this photo. Seems like a fair amount of RAM. What's the Ethernet (dual?) for? And the RJ45? and what looks like a DVI connector? Which ones go to the display? | |
| |
| | #45 |
|
hi blueroom, have a look at the datasheets in page 1, it shows the various connections between parts. I was thinking the same about processing power, but the sx deffo has the power for atleast 4 panels - which is a good start because the logic involved will be sorted - and will be the same regardless of which chip is used. I think we are very very close! I will build one of these (it will be crude and only 8x8), based on 4 MAx7219 chips, which will emulate your system exactly - and I will write some code to show you how to vary the brightness of individual bulbs, eg make more colours It will take me a few days to get LEDS ect in
__________________ There will come a day when PICs will rule the world! Last edited by SMUGangsta; 23rd October 2008 at 09:49 PM. | |
| |
|
| Tags |
| display, learn, led, pwm, rgb, spi, type |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| determine P type or N type diode | shermaine | General Electronics Chat | 7 | 5th October 2008 02:34 AM |
| help me learn | dre22 | General Electronics Chat | 12 | 29th August 2006 01:03 PM |
| LCD display driving method/waveform type | Futterama | Electronic Projects Design/Ideas/Reviews | 8 | 12th January 2006 05:00 PM |
| I want to learn! | Macka | General Electronics Chat | 16 | 4th November 2005 03:18 PM |
| need help i want to learn | timi | Electronic Projects Design/Ideas/Reviews | 2 | 11th December 2003 04:18 PM |