Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 15th April 2009, 12:25 PM   #16
Default



I'm doing a column scan like Mike, K8LH mentioned.You can see when it displays the word "CONTACT" it shows the direction I'm scanning
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline  
Old 16th April 2009, 10:23 PM   #17
Default

hey Gayan can you write some notes on the operation of this signboard. I know it may seem like a silly question but how did you center the text? was it like a auto center or was it manual? Manual being you typed spaces to make it looked center?

Do you mind if i use this design? If i was to ever make any money from something i use from someone else i would of course give them some royalty if you understand
AtomSoft is offline  
Old 17th April 2009, 04:36 AM   #18
Default

Hi AtomSoft

First of all you need to multiplex your display what ever the method you like.
The two methods I use is column scanning & row scanning. You can do that using shift registers or using direct I/O ports.
The above project I used a column scan because it has only 64 columns. If I have 100 columns & above then I might do a row scanning method.

In column scan I’m scanning one column at a time like multiplexing SSDs.
Load 1st column –show for a while—turn off previous column—load next column-- show for a while-- turn off previous column--…………………
If you have 5 columns then you need 5 column registers.
If you have 20 columns then you need 20 column registers.

The column registers contains data or pattern. When you multiplexing rapidly then the data will show on the matrix display.

I think the above things you know very well.

Regarding balance (centering) you don’t need special code to do that. For a 5 column display if you want to show only the middle column, you need to turn off (clear) the 1st, 2nd, 4th, 5th column registers & leave the 3rd column with data. So when multiplexing rapidly it will show only the middle column data.

When a letter moves from right to left I use a “Shift Count Register” so it’s easily to place the text on what ever the place you like.
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline  
Old 17th April 2009, 02:07 PM   #19
Default

While Gayan's 1/64th duty cycle matrix seems to work well, I would recommend scanning rows at a 1/8th duty cycle instead to improve brightness and better manage 'peak' current requirements. You could do this by replacing the 74HC164's with 74HC595's + ULN2803's, or better yet use TPIC6C595's or MIC5821's or one of the other serial-to-parallel sinking driver IC's. Then remove the current limiting resistors from the row driver and put them on the column drivers.

Mike

Last edited by Mike, K8LH; 18th April 2009 at 03:13 PM.
Mike, K8LH is offline  
Old 17th April 2009, 03:41 PM   #20
Default

ok how about for controlling BI-Color LEDs Matrixs. I have 5x7 Matrix LED but they are BI color. Some info:

Orange red and yellow green

Unit is column cathode
row anode

Can you tell me or give me your opinion on the best way to control this? Im sure i can add or alter it for Many without issue but thoughts would be nice.
AtomSoft is offline  
Old 18th April 2009, 03:43 PM   #21
Default

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
Mike, K8LH is offline  
Old 18th April 2009, 04:10 PM   #22
Default

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

<B>LED1145</B><BR>5x7 LED Dot Matrix 2 Color - LED1145

and am going to order these next:

<B>LED1112</B><BR>LTP747R - LED1112

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?
AtomSoft is offline  
Old 18th April 2009, 05:09 PM   #23
Default

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
Attached Thumbnails
LED SignBoard 64X8 - PIC 16F628A-bi-color-5x7-matrix.png  

Last edited by Mike, K8LH; 19th April 2009 at 05:14 PM.
Mike, K8LH is offline  
Old 18th April 2009, 11:37 PM   #24
Default

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
AtomSoft is offline  
Old 18th April 2009, 11:44 PM   #25
Default

Sorry Jason. My explanations are never up to par.

Hope you're feelin' better soon.

Mike
Mike, K8LH is offline  
Old 19th April 2009, 01:22 PM   #26
Default

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.
AtomSoft is offline  
Old 19th April 2009, 01:56 PM   #27
Default

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
Mike, K8LH is offline  
Old 19th April 2009, 01:58 PM   #28
Default

Quote:
Originally Posted by AtomSoft View Post
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).

Quote:
Originally Posted by AtomSoft View Post
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 by dougy83; 19th April 2009 at 02:01 PM.
dougy83 is offline  
Old 19th April 2009, 02:02 PM   #29
Default

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 by Mike, K8LH; 19th April 2009 at 02:06 PM.
Mike, K8LH is offline  
Old 19th April 2009, 02:16 PM   #30
Default

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 by be80be; 19th April 2009 at 02:27 PM.
be80be is offline  
Reply

Tags
64x8, led, pic, signboard

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
10x7 LED SignBoard (MERRY X MAS) Gayan Soyza Micro Controllers 44 10th May 2008 04:49 PM
16f628A - How do I do this? Hakachukai Micro Controllers 6 4th July 2007 05:09 PM
Signboard electronic leticia Micro Controllers 1 18th March 2007 05:01 AM
7X48; 250 character signboard don.vito Micro Controllers 0 4th January 2007 12:11 AM
16f628a RMIM Micro Controllers 8 29th July 2006 08:45 AM



All times are GMT. The time now is 06:01 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker