Tim Mitchell wrote:> In article <991ca63c.0411091854.1c820bdb@posting.google.com>, Scott > Hooper <sfk.hooper@gmail.com> writes > >> Tim Mitchell <timng@sabretechnology.co.uk> wrote in message >> news:<LfM7uGCT8IkBFAuX@tega.co.uk>... >> >>> I have done it using 74HC595 serial to parallel chips. 8 leds off each >>> chip, and you just chain them together, the whole thing becomes one big >>> serial shift register requiring only 3 pins from the micro. They will >>> drive low current LEDs directly or add a ULN2803 driver chip to drive up >>> to 500mA per output. Cheap and it works. >> >> >> Hi Tim, >> >> This sounds like exactly the sort of thing I'm after. I google'd that >> chip and it does sound like the chip for the job. A few questions: >> What PIC did you use? Do you have a schematic of how it goes together? >> Do you have a source module available? What language/compiler was >> used? (I did say a few questions :) ) Lastly, something confuses the >> heck out of me... I can see that you can daisy chain the 74HC595 chips >> together, but how do you tell your PIC which one to address? >> > Didn't use a pic, used an 8051. Code was 8051 assembler but it's really > simple. > > You address the chips just by clocking the bits out. Say you're > controlling 64 LEDs, you clock out 64 data bits (set the value to the > data pin, take the clock pin low then high, 64 times). The first data > bit goes to the LED furthest from the pic, then each bit goes to the > next LED, the 64th bit going to the LED nearest the pic in the chain. > > On the 595 chip, once you've clocked all the bits into position, you > toggle a latch line to set the bits to the outputs (display them).I've done 96 LEDs using a PIC 18F242 and 6 Allegro A6276 16 bit shift register/driver chips, which works really well. I use software generated PWM to allow each LED to have an independent 8 bit brightness level, controlled by an RS485 input. Martin
Help! PIC Controlled LED Array Circuit - 100 LED's??
Started by ●November 9, 2004
Reply by ●November 10, 20042004-11-10
Reply by ●November 10, 20042004-11-10
Dorsai <dorsai@mail.com> wrote in message news:<Xns959CCFF23AC79dorsaiatmaildotcom@216.196.97.142>...> > Get yourself some 74154 decoder chips. 4 inputs to 16 outputs; active-low > on the output. A couple of these as a matrix would give you 16^2 > capability for only 8 output pins (or even only 5 if you commoned the > inputs and used a line for device select).That sounds pretty good. Are you able to point me to a schematic & matching code example of that scenario?
Reply by ●November 10, 20042004-11-10
sfk.hooper@gmail.com (Scott Hooper) banged on the keyboard until producing news:991ca63c.0411100421.27f5c6ca@posting.google.com:> Dorsai <dorsai@mail.com> wrote in message > news:<Xns959CCFF23AC79dorsaiatmaildotcom@216.196.97.142>... >> >> Get yourself some 74154 decoder chips. 4 inputs to 16 outputs; >> active-low on the output. A couple of these as a matrix would give >> you 16^2 capability for only 8 output pins (or even only 5 if you >> commoned the inputs and used a line for device select). > > That sounds pretty good. Are you able to point me to a schematic & > matching code example of that scenario? >Google 74154 decoder, you'll turn up the whole datasheet for it. Can't help you with the code - I'm an Atmel weenie :-) -- * * * * * * * * * * * * * * * * * Dorsai - Author of Erotic Fiction http://www.asstr.org/~Dorsai * * * * * * * * * * * * * * * * * Yoda of Borg am I. Futile is Resistance...Assimilate you, I will...
Reply by ●November 11, 20042004-11-11
In article <991ca63c.0411091854.1c820bdb@posting.google.com>, Scott Hooper <sfk.hooper@gmail.com> wrote: -Tim Mitchell <timng@sabretechnology.co.uk> wrote in message news:<LfM7uGCT8IkBFAuX@tega.co.uk>... -> I have done it using 74HC595 serial to parallel chips. 8 leds off each -> chip, and you just chain them together, the whole thing becomes one big -> serial shift register requiring only 3 pins from the micro. They will -> drive low current LEDs directly or add a ULN2803 driver chip to drive up -> to 500mA per output. Cheap and it works. - Since this would have been my suggestion I guess I'll enter here... -Hi Tim, - -This sounds like exactly the sort of thing I'm after. I google'd that -chip and it does sound like the chip for the job. A few questions: -What PIC did you use? Doesn't really matter. You could make your life a bit easier if you used a PIC with a SPI module as you can clock out data up to 5 Mbps. In the 18 pin package I almost always recommend the 16F88, which has SPI and a nanowatt module so you don't even need an external crystal to run it. - Do you have a schematic of how it goes together? No. But it's not too difficult to walk through. The toughest problem is that each of the LEDs will require an individual resistor. Look to get DIP resistor packs with a common end, which for 16 pin parts will give you 15 resistor ends per pack. You'd only need 7 of them. Also make sure you get 74HC595 or 74HCT595 parts. They are pretty much guaranteed to swing from rail to rail. Finally you may want to take care in driving both the latches and clocks for the 595s. 17 pins is a lot to drive. You may want to add a buffer between the PIC output pin and those inputs. For example a single 74HC04 inverter will give you 6 outputs so you could connect latches/clocks in groups of 3. Back to the circuit. The 595 is a serial to parallel converter. You clock in 8 data items using the clock input. Then you latch them to the output using the latch. They can be daisy chained by using the always on Q7 output as the input into the next 595. With SPI it's pretty simple. Wire up the first data input to the SPI output and the other Q7 outputs to the suceeding data input of the next 595. Then wire all the clocks together (fanning it out with the 6 inverters described above). Then program the 16F88 to clock the data out. 13 writes to the SPI transmit buffer and you're done. You'll need another pin for the latch too (again fanned out with another HC04 inverter) Now for each LED wire the anode to a 595 output. Wire the cathode to one of the resistors on the resistor packs. Finally ground the common end of each resistor pack. Voila! you're ready to program. Of course I'd suggest testing with 16 LEDs, 2 HC595s, and a resistor pack or two until you're sure it works right. Then add the rest. BAJ -Do you have a source module available? Probably a custom project. Most folks with this many LEDs would multiplex them so it's not very likely that you'll see a whole lot of compatible code. - What language/compiler was -used? (I did say a few questions :) ) I'm of two minds on this: PIC assembly is best because everyone knows it. However like all assembly languages it's a bit tough to chew on. I have a couple of other language possibilities on my PIC languages page here: http://www.finitesite.com/d3jsys/languages.html - Lastly, something confuses the -heck out of me... I can see that you can daisy chain the 74HC595 chips -together, but how do you tell your PIC which one to address? You don't. You serially clock in 112 bits which gets clocked into the 13 HC595 which are daisy chained. So if you want to change one, you have to reclock all of them. But it's so simple with SPI when you have it, it's really not an issue. - -To everyone that replied, thank you very much. But I am quite the -novice and hoping that someone can provide me with a PIC-compatible -schematic/source-code combo I don't think you're going to find a lot of code hanging around, especially for newer chips with SPI available. While you are a novice, you have already been given quite a few resources, and also there are folks hanging around here and places like the PICLIST (www.piclist.com) that would be glad to help. Here's a sample of a tutorial that may help: http://homepages.which.net/~paul.hills/Software/ShiftRegister/ShiftRegisterBody.html BAJ
Reply by ●November 11, 20042004-11-11
In article <419182BF.14C7A598@mail.asb.com>, Neil Kurzman <nsk@mail.asb.com> wrote: - - -Scott Hooper wrote: - -> I am new to electronics, but a programmer by trade. I am trying to -> achieve a circuit of up to 100 independently controlled LED's (not -> segmented display modules). Ideally the circuit would be controlled by -> one or more PIC microcontrollers as I have a Willem II programmer. My -> application is artistic in nature and requires the leds to be spread -> out over a wide area as opposed to being in a grid formation. -> -> I have heard a lot of conflicting reports about Maxim's MAX721xx chips -> for this job. Some say it's the one I want, but others (including an -> actual Maxim tech-supporter) say it's more suited to the segmented -> displays. I have experimented with this chip with little success. -> -> Has anybody achieved anything like this? I have scoured the Internet -> and newsgroups for literally weeks looking for a matching schematic -> and source module. I have found a few Basic Stamp modules but I'm not -> setup for that at all and would rather stick with native PIC. The only -> compiler I have is MPLab's MPASM. -> -> Many thanks to anyone that can help - -Why not several PICs 1 master and the rest slaves. Because he's a novice and multichip communication isn't something that a novice needs to be doing. Keep it simple. That's the path to success. Even if there's more wiring involved. BAJ
Reply by ●November 11, 20042004-11-11
In article <991ca63c.0411100421.27f5c6ca@posting.google.com>, Scott Hooper <sfk.hooper@gmail.com> wrote: -Dorsai <dorsai@mail.com> wrote in message news:<Xns959CCFF23AC79dorsaiatmaildotcom@216.196.97.142>... -> -> Get yourself some 74154 decoder chips. 4 inputs to 16 outputs; active-low -> on the output. A couple of these as a matrix would give you 16^2 -> capability for only 8 output pins (or even only 5 if you commoned the -> inputs and used a line for device select). - -That sounds pretty good. Are you able to point me to a schematic & -matching code example of that scenario? First off all we'd do is what you'd do: Google from 74154 and PIC and hope that something pops up. Secondly this path has some serious issues involved that you need to know about. The concept is called multiplexing, and it's how most large displays are addressed. It cuts down on the number of parts reqired. but on the other hand is much more difficult to manage. First off you can really only turn on (or off) one LED at a time. So this means that you'll get a flickering display. Worse than that is trying to manage 128 LEDs means that each can only be on 1/128 of the time. So that means everything is going to be really, really dim. To make it work you then have to delve into power electronics, which as a novice is somewhere you really don't want to go. Stick to the HC595 serial interface. Yes it means that you'll have 13 of them on the board along with at least 7 resistor packs. But it's easy to understand and each LED can be on or off completely independantly of the others. Also be sure to download a copy of the PIC Midrange Reference Manual off of Microchip's site. It'll give you pointers and example code as to how to use stuff. Good Luck. BAJ
Reply by ●November 11, 20042004-11-11
sfk.hooper@gmail.com (Scott Hooper) writes:> I am new to electronics, but a programmer by trade. I am trying to > achieve a circuit of up to 100 independently controlled LED's (not > segmented display modules). Ideally the circuit would be controlled by > one or more PIC microcontrollers as I have a Willem II programmer. My > application is artistic in nature and requires the leds to be spread > out over a wide area as opposed to being in a grid formation.We did something like this with lighting panels with 2 separate circuits on each panel. The PICs were interconnected with CAN, with a local DIP switch to set the address of each one. The PWM outputs were used to drive the LEDs on the panels via a couple of MOSFETs. It was pretty nice to do. cheers, Rich. -- rich walker | Shadow Robot Company | rw@shadow.org.uk technical director 251 Liverpool Road | need a Hand? London N1 1LX | +UK 20 7700 2487 www.shadow.org.uk/products/newhand.shtml
Reply by ●November 11, 20042004-11-11
Martin Walton <martin_underscore_walton_a@t_flyingpig_full.stop_com> wrote in message news:<cmssbp$81o$1$8302bc10@news.demon.co.uk>...> Tim Mitchell wrote: > > In article <991ca63c.0411091854.1c820bdb@posting.google.com>, Scott > > Hooper <sfk.hooper@gmail.com> writes > > > >> Tim Mitchell <timng@sabretechnology.co.uk> wrote in message > >> news:<LfM7uGCT8IkBFAuX@tega.co.uk>... > >> > >>> I have done it using 74HC595 serial to parallel chips. 8 leds off each > >>> chip, and you just chain them together, the whole thing becomes one big > >>> serial shift register requiring only 3 pins from the micro. They will > >>> drive low current LEDs directly or add a ULN2803 driver chip to drive up > >>> to 500mA per output. Cheap and it works. > >> > >> > >> Hi Tim, > >> > >> This sounds like exactly the sort of thing I'm after. I google'd that > >> chip and it does sound like the chip for the job. A few questions: > >> What PIC did you use? Do you have a schematic of how it goes together? > >> Do you have a source module available? What language/compiler was > >> used? (I did say a few questions :) ) Lastly, something confuses the > >> heck out of me... I can see that you can daisy chain the 74HC595 chips > >> together, but how do you tell your PIC which one to address? > >> > > Didn't use a pic, used an 8051. Code was 8051 assembler but it's really > > simple. > > > > You address the chips just by clocking the bits out. Say you're > > controlling 64 LEDs, you clock out 64 data bits (set the value to the > > data pin, take the clock pin low then high, 64 times). The first data > > bit goes to the LED furthest from the pic, then each bit goes to the > > next LED, the 64th bit going to the LED nearest the pic in the chain. > > > > On the 595 chip, once you've clocked all the bits into position, you > > toggle a latch line to set the bits to the outputs (display them). > > I've done 96 LEDs using a PIC 18F242 and 6 Allegro A6276 16 bit shift > register/driver chips, which works really well. I use software > generated PWM to allow each LED to have an independent 8 bit brightness > level, controlled by an RS485 input. > > MartinHi Martin, Would there be any chance of seeing your circuit and the code you used? Thanks, Scott Hooper
Reply by ●November 12, 20042004-11-12
How about an LED driver IC? The MM5451 contains a 35 bit shift register, latches and variable current-limited output drivers. Three of these chips will individually control over 100 LEDs with no external drivers and no current limiting resistors. They cost about $2 each. What more could you want? http://www.micrel.com/product-info/products/mm5450.shtml -- Mike
Reply by ●November 12, 20042004-11-12
On Fri, 12 Nov 2004 21:03:00 GMT, "Mike Eck" <aaroneck@optonline.net> wrote:>How about an LED driver IC? The MM5451 contains a 35 bit shift register, >latches and variable current-limited output drivers. Three of these chips >will individually control over 100 LEDs with no external drivers and no >current limiting resistors. They cost about $2 each. What more could you >want? > >http://www.micrel.com/product-info/products/mm5450.shtmlOr this, http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3195 64 discrete LEDs with the MAX6951. It's more expensive, though, and I cannot find it at Digikey. Anyone have any experience with the MAX6951 -- suppliers, availability, various performance issues, comments, etc? Jon