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.

LED SignBoard 64X8 - PIC 16F628A

Status
Not open for further replies.
Hi Jason,

You've got lots of choices depending on how you want the display to work. For example, do you want to support multiple colors per entire display or per individual LED? If so, how many colors do you want to support?

I kicked around a few ideas for those particular 2" Red/Green displays and was actually thinking about buying some but it's just not in the budget.

Mike
 
Dude they are dirt cheap(For 10 its $11.20) i own 10 of these:

**broken link removed**

and am going to order these next:

**broken link removed**

They work well when i do a test on each led.

I want to be able to switch between showing RED/ORANGE text and YELLOW GREEN
I dont care for showing to colors at one time.

Like if i have the text "SALE" centered on the display i want it to flicker red-orange to green- yellow.

You get it?
 
I did see those displays awhile back but they're very small compared to those large Red/Green displays. Very nice price though at only 69 cents.

Ok so you want to support multiple colors for the entire display, one color at a time. In that case please check out this 'trick' design especially well suited for the pin out on those Red/Green displays;

Use any of the popular serial-to-parallel sinking driver IC's to drive the columns. This single set of ICs will drive both the green and red columns (only one at a time). Use a pair of inexpensive 74HC138 decoder IC's with high current P-FETs on the outputs to drive the rows. The PWM period is equal to the row scan period and the duty cycle is used to select the overall display color by selecting one and then the other 74HC138 row driver during each PWM period. A 0% duty cycle produces a solid red display and a 100% duty cycle produces a solid green display. Intermediate duty cycles settings produce different shades between red and green, including yellow if I'm not mistaken, by turning on one 74HC138 during PWM "on" time and the other 74HC138 during PWM "off" time during each PWM period.

Driving the display should be easy. During each PWM period interrupt you would clock out 40 bits of row data to the driver IC shift registers. Then you would blank the display (OE = 1), latch the data onto the driver IC outputs, select the new row (0..6), and turn the display back on (OE = 0). Change the color of the entire display in your main program simply by changing the PWM duty cycle value.

Code:
unsigned char led[7][5];    // 7 rows of 40 bits

void interrupt()
{ pir1.TMR2IF = 0;          // clear timer 2 interrupg flag
  if(row++ == 6) row = 0;   // bump row number, 0..6
  ndx = 5;                  // row byte index (0..4)
  while(ndx)                // put 40 bits into shift registers
  { ndx--;                  // 0..4
    work = led[row][ndx];   //
    for(i=0; i<8, i++)      //
    { DAT = work.0;         // setup DAT line
      CLK = 1; CLK = 0;     // pulse CLK line
      work >>= 1;           //
    }
  }
  OE = 1;                   // blank the display
  LAT = 1; LAT = 0;         // latch SR data onto driver outputs
  portb &= 0b11111000;      // clear old row select bits
  portb |= row;             // turn on new row
  OE = 0;                   // turn on display
}
I hope the drawing doesn't look too confusing. I split the displays into seperate red and green components in the drawing.

Do you "get it" (grin)?

Food for thought. Mike
 

Attachments

  • Bi-Color 5x7 Matrix.PNG
    Bi-Color 5x7 Matrix.PNG
    63.6 KB · Views: 5,294
Last edited:
dont be discouraged but i got lost. But be sure ill get it later on. I have a major headache on the top of my left eye and cant even think straight. give me some time to heal lol and ill tell u if i get it lol
 
why are the GREEN LEDs connected to VDD?

or is that supposed to mean its te same as the RED ones?
I think i understand it a bit. But how would the 74HC138 be useful for the rows? If i turn on 1 whole row that means i have to scan from top to bottom right?

Maybe if you can clear the above questions to me ill get it. :D
 
The green LED columns are connected to the sinking driver outputs just like the red LED columns.

The 74HC138's are useful because they have both active high and active low output enable pins. We connect the PWM signal to an active high enable pin on one 74HC138 and to an active low enable pin on the other 74HC138. One 74HC138 is enabled during the PWM signal "on" time and the other 74HC138 is enable during the PWM signal "off" time during each row scan. This scheme allows up to about 1024 colors between green and red simply by changing the CCPR1L duty cycle register in your Main program.

Another way to drive these displays would be to tie the red and green rows together, drive them with a single 7-row driver, and use seperate sinking driver IC sets for the red display columns and the green display columns.

You can scan the rows anyway you want, from top to bottom or from bottom to top.

The ISR is so incredibly simple because the led[] array is directly mapped to the display hardware. Set or clear individual bits in the array in your Main program. The ISR automatically 'paints' each row using data from this array;
Code:
led[7,5] = { 0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 0
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 1
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 2
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 3
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 4
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,   // row 5
             0b00000000,0b00000000,0b00000000,0b00000000,0b00000000 }; // row 6
Again, sorry about the drawing. I couldn't quite figure out how to show how I'm driving the individual 5x7 green portion and the 5x7 red portion of the displays.

Later, Mike
 
why are the GREEN LEDs connected to VDD? or is that supposed to mean its te same as the RED ones?
Connect the same as the red ones. There is twice as many resistors shown as needed: either the red or the green is selected (due to the complementary enable lines).

But how would the 74HC138 be useful for the rows? If i turn on 1 whole row that means i have to scan from top to bottom right?
You can scan the rows in any order you want with the '138 as shown.

I guess the purple blocks on the rows are current buffers. The columns will need buffering also.
 
Last edited:
Hi dougy83,

The text in that post explains that the purple blocks are high current P-FET row drivers and the columns are connected to sinking driver IC's (which provide much higher current compared to a plain old 8 bit serial-to-parallel shift register IC).

Separate current limiting resistors for red and green displays may indeed not be needed but I included them because I thought there may be a slightly different Vf spec' for the red and green displays.

Mike
 
Last edited:
He is loading the columns and scanning the rolls I got a big led sign board They wired it just like what mike did. The uC was bad in it so I been playing with it. This post has open up my eyes thanks mike for showing some code
 
Last edited:
heh i think i get it now. Ill order some parts from my dipmicro and bgMicro and get started on this. The small 5x7 matrix's are cool since they are small and take up almost no space lol GREAT FOR BREADBOARD.
 
Where I come from a rows a rows even if you spell it rolls I used this chip for my row driver
DS75492 MOS-to-LED Hex Digit Driver
 
Last edited:
Jason (AtomSoft),

Great. Your red/green display experiments should be fun. I'm very curious about the color combinations you can get with those displays. For example, hook up a potentiometer to an ADC input and use that to set the PWM duty cycle then show us some of the 1024 colors you get between solid red and solid green.

Have fun. Mike
 
Looks like Rolls to me

Don't they look the same **broken link removed**
and this
**broken link removed**
 
Look at DIY computer Christmas

They have the code, circuit boards etc. even where to obtain the Allergo chip for free (I have 6 of them as I was/am planning on building such a unit.
using Vixen software on a PC but pretty sure it can be done as a stand alone unit.
 
That's not what there doing there making led signs boards this is with a 12f683 and it can light 105 leds with only 5 pins and yes it will do more then this but I'm not posting because I will never get what I want to do done for all the pm's.
[embed]http://www.youtube.com/v/ShmWUE1sRBM&hl=en&fs=1[/embed]
 
...but I'm not posting because I will never get what I want to do done for all the pm's.
Try using this (or similar) in your signature. With it I only get one or two a week.

Please post questions to the forums. PM's are for personal communication.

Tech questions are best asked in the public forum where all can make use of the info.
 
Status
Not open for further replies.

Latest threads

Back
Top