Controlling hundreds of LEDs

If you've got an 8-bit shift register, what happens when you shift in the 9th bit? The joke is, "It falls into the Bit Bucket, of course", meaning it disappears out the end. Seriously, if you've got a line of serial data, you can chain 8-bit shift registers so the first bit is shifted into the second IC when the 9th bit is shifted in. It's a simple shift register concept, and the SQ8 pin on the '595 is where you either put the bit bucket (;-) or you put another shift register IC.

If you're doing 5X7 matrix displays, you don't have access to all 70 LED pins anyway. You have to address them as row/column. If you do it that way, you will minimize the shift register outputs. But, like the professional displays, you then have to be concerned about a multiplexing setup where you use persistence of vision to go across the columns fast enough that they don't appear to flicker.

I've been following the flurry of posts here, and it seems like you've got a ways to go on your understanding of the hardware end of things. If you want to do a project over the holidays, possibly you might want to consider a smaller concept (like one alphanumeric character display) until your hardware capabilities catch up to your software skills.

Good luck Chris

Reply to
CFoley1064
Loading thread data ...

Thought so. Looks like a nice (*cough* easy) way to do what I want!

First thing is to build my PIC Programmer - if I don't get past that... ;-)

I wasn't planning on jumping right into anything, just wanted to make sure any smaller "test cases" are headed in the right direction, and not that I learn to control 15 LEDs and then someone says "that'll never work for more than 20"!

Thanks for your help (and everyone else). I've learnt a lot before I've even started fiddling with hardware :-)

Danny

Reply to
Danny T

also

sure

I

approach:

through

to

I agree with you. But looking at the cost aspect, it's going to cost a lot to populate a board with several hundred LEDs, considering that ultrabright red LEDs cost 20 or more cents apiece. And then you have to figure in your time, which may be considerable.

Reply to
Watson A.Name - "Watt Sun, th

Danny,

I got a break for a few minutes. Maybe I could interest you in some generalizations and mental models?

My idea regarding utilizing different frequencies is something akin to tuning into two or more radio stations simultaneously. Some techniques used for packet radio also come to mind. Some of these ideas are perhaps complicated given the present exercise, but on a longer term perspective they may prove helpful. My own efforts relate to homemade robotic telescopes for amateur astronomy, so there could be a lot of overlap with your longer term goals. I am having a lot of trouble with my website, and plan to move it, but here it is (for now)....

formatting link

Some of my thinking comes from concepts like ring tone generators that have vast numbers of combinations. Every time you dial a telephone number (hopefully) you reach only one telephone, even though there are many millions (billions) of telephones out there.

Regarding your parallel port, I have always viewed the data stream from this device as something much more than just sets of 8 bits. My motor example demonstrates different frequencies on different pins. Indeed, the motors end up turning at different speeds and also in different directions. This port operates at 8 MHz. These motors will not respond (directly) to such high frequency, and even if it could be done, it does not appear for now that you are trying to get your LEDs to turn on and off in the MHz frequency. You can in principle generate a series of frequencies essentially the same as a set of dial tones. Indeed, actual dial tones, such as on your telephone, are only in the low KHz range. All of them (and more) could be generated from a single pin on your parallel port, and we have not even gotten into subharmonics, which could also be employed. A typical telephone has 12 tones (if you include asterisk and pound). Using only these, you have now escaped the binary base 2 system and now have a base 12 system. You have gone from 2^8 (256) values up to 12^8 (nearly 430 million) values. I cannot imagine you are wanting EVER to control 430 million LEDs, but I hope I have made a compelling argument to at least consider frequency as a parameter to extract the maximum number of outputs from a single 8 bit TTL port, especially, the parallel port which should have a fixed 8 MHz frequency. And yes, I have used such strategies with success. Right now, this is about you and your goal, Danny. My sad story some other time.

Back to the laboratory, I go....

:)

Dominic

Reply to
Dominic-Luc Webb

I thought you were a programmer. It's common knowledge that a SMOP is an acronym for "Small Matter of Programming". Thus, a mSMOP is a tiny project.

--
Regards,
   Robert Monsen

"Your Highness, I have no need of this hypothesis."
     - Pierre Laplace (1749-1827), to Napoleon,
        on why his works on celestial mechanics make no mention of God.
Reply to
Robert Monsen

---------------- "bit tricky"?? Hahahahahah! "software guy"?? Hahahahahah! "Just a hobby thing/cheaper the better"?? Hahahahah!

Amazing what software guys think we do here:

formatting link

-Steve

--
-Steve Walz  rstevew@armory.com   ftp://ftp.armory.com/pub/user/rstevew
Electronics Site!! 1000\'s of Files and Dirs!!  With Schematics Galore!!
http://www.armory.com/~rstevew or http://www.armory.com/~rstevew/Public
Reply to
R. Steve Walz

displays,

--
Of course. That, however, doesn\'t change the validity of my statement.
Reply to
John Fields

Dmitri,

As per my remarks about using frequency to get more permutations, one concept I hoped someone might "latch" into is that LED brightness should be possible to control by changing duty cycle. By changing the rate at which 0's and 1's change, one can obtain such effects. So my thoughts on utilizing frequency were not only directed towards selection of LEDs and large numbers of permutations, but also brightness control. I am curious if any of the controllers you know of permit brightness control by duty cycle (as opposed to voltage) that would have a much wider dynamic range than just two, like "bright" or "normal" intensities?

I guess one could envision a frequency-to-voltage converter to control brightness by voltage, but I suspect changing duty cycles would be energetically more efficient.

I guess one could also consider that frequency modulation and analog circuitry has a lot of parallels with biological processes. Danny did mention a long term goal of robotics. I am rather impressed with the analog robots I have seen.

Dominic

Reply to
Dominic-Luc Webb

--
The ratios of frequencies between adjacent notes on the equally
tempered scale is the twelfth root of two.  No such relationship
exists between the tones used to generate touch-tone DTMF.  Moreover,
the only outputs available from a normal touch-tone keypad are seven
two-note chords, so calling what you can get out of a touch-tone
keypad a \'tune\' might be stretching it.
Reply to
John Fields

A little different notation under the timing, just for the sake of clarity...

--
John Fields
Reply to
John Fields

Well, as a matter of fact, brightness control is one of the major reasons people get to use specialized ICs (second after multiplexing, of course). All (I know of) of them would allow you to control brightness either digitally for selected segments or analog for overall brightness of the module. As far as I know, all use PWM for digital brightness control.

--
Dmitri Abaimov, RCDD
http://www.cabling-design.com
Cabling Forum, color codes, pinouts and other useful resources for
premises cabling users and pros
http://www.cabling-design.com/homecabling
Residential Cabling Guide
-------------------------------------





##-----------------------------------------------##

Article posted with Cabling-Design.com Newsgroup Archive

http://www.cabling-design.com/forums

no-spam read and post WWW interface to your favorite newsgroup - 

sci.electronics.basics - 8240 messages and counting!

##-----------------------------------------------##
Reply to
Dmitri(Cabling-Design.com

LOL!!!

I've never heard that term before... Guess I'm only really a wannabe programmer ;-(

--
Danny
Reply to
Danny T

I'm confused now... By frequency, do you mean I can output things distinguishably different than just the +5v I@m currently sending??

Reply to
Danny T

^^^^^ 12

--
John Fields
Reply to
John Fields

Hi Danny,

Yes. On the one hand, there is the absolute value 0 or 1, which could be interpreted as "digital" off or on, respectively. As in my stepper motor example, there is also the relative rate at which 0's and 1's are changing. The coils on a stepper motor respond to these changes and the shaft turns faster or slower. A speaker would be another example, also operated by a coil. Passing pulses (sets of 0's and 1's) at different rates (frequencies) could in principle yield different tones, much like what happens when you hit different buttons on your telephone, although, let us not get bogged down in details of how the registered trademark "Touch-tone" works. Just note that different frequencies are being generated when you hit different buttons. Choosing different combinations of buttons in a series could play different tunes, for instance. There is no reason a single pin from your parallel port could not do something similar. Consider what would happen if you sent 20 0's and then 20 1's, and repatedly this loop continuously and the output was a speaker.

Distinguishing these two concepts: Feeding a counter IC, like a Johnson

4017 at different rates from a pin of the parallel port would simply make the 4017 cycle through the stages faster or slower. Connecting LEDs to each of the stages would cycle through each LED, but would not necessarily change the brightness of each LED. If instead, you connected more directly from the port to an LED (using an appropriate resistor), you could not only turn it on, the rate at which you switch between 0's and 1's would dictate brightness. I think it ends up working similar to a diac/triac circuit that controls the brightness of a bulb by chopping up the current.

For starters:

Try this, since you can program your parallel port; with whatever language you are programming in, you can have for/while loops that cycle between the 0 and 1 states. Add a pause between the instructions for setting 0 and

  1. Below is a code fragment I once wrote in C (for Linux). You can change frequency by changing the value of usleep. This would cause stepper motors to turn faster or slower. It could presumably also change the tone of a speaker or the brightness of an LED, etc. Taking this to a further level of complexity, one could split the outgoing signal from each data pin (voltage or current divider, logic circuits, etc) to take advantage of both absolute 0 and 1 states, as in loading registers, etc and also the frequency information (direct pulse modulation of LED brightness) or via a frequency-to-voltage conversion (voltage dictates brightness). It represents one means of sending serial information via a parallel port. Similarly, a Morse code scheme sent from a single pin could also be used.

step_function() { for(i=1; i

Reply to
Dominic-Luc Webb

control

The latest such controller I've worked with allows the pilots of Lynx helicopters to vary the brightness of cockpit displays to cater for ambient from night (using night vision goggles) to full sunlight. No big deal. Been around for ages. One thing that the wonderful frequency stuff seems to ignore is the need to continually use almost all of the cpu power and write huge amounts of data to the port. Using latches to store the LED controls allows the cpu to do something else for 99% of the time. Also reduces interference emitted from your LED circuit - could be a source of trouble with the neighbours if you interrupt their tv/radio... hth Neil

Reply to
Neil

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.