"high impedence", you can drive N*(N-1) LEDs from N pins. So the little 8
pin microcontroller like a PIC12Fxxx or an ATtiny11 can drive 20 LEDs on
its five available output pins, and still have one pin left for some kind of input.
See also http://www.instructables.com/id/Charlieplexing-LEDs--The-theory/
20-LEDs.zip159 KB
Remove these ads by
Signing UpStep 120 LEDs on 5 pins
the whole package) are attractively priced and 'cute', but the question
arrises as to how you can make the best use of those pins for common
applications such as driving LEDs.
A direct-connect approach to driving LEDs consumes one pin for each
LED. A traditional multiplexing scheme where rows of LED anodes are
driven by one set of N pins and each row's common cathode is driven by
another set of M pins manages to light N*M LEDs with N+M pins.
However, on a processor with only 5 or fewer outputs (as is the case
with most 8-pin microcontrollers), this barely gets you any more
outputs than direct drive.
| « Previous Step | Download PDFView All Steps | Next Step » |













































hoping for your answers...
(I'm not familiar with this processor. My comments are based on the ability to do indexed addressing mode. Index into a table. For example, for the "noadjust" routine, you would have:
TABLE: .byte 0b00100, 0b00010, 0b00001, 0b10000, 0b01000
copy TEMP to index register
load accumulator TABLE,index
copy accumulator to ANODE
...
You can have separate tables for the port and the direction register. The tables can be large (256 bytes for an 8-bit scramble function) without needing a compare for each value possible. The code becomes compact and easy to debug. You can stack tables. For example, one set to give the port/direction drives, and one to do the bit scrambling (used twice: once to scramble the port bits, again to scramble the direction bits)).
Table lookup is the key to fast processing!
http://www.edn.com/article/CA6666229.html?spacedesc=designideas&industryid=44217
the additional transistor should be able to source additional LED in series, at some additional cost though...
In a traditional multiplexed environment it is easy to make the anodes and/or cathodes each have their own high-current drivers as needed, but it's much more difficult to do this with a connection that can be anode, OR cathode, OR off depending on circumstances (at least, without reaching a circuit complexity level that is the opposite of what we're trying to achieve by charlieplexing.)
(total - led voltage)/ma = ohms??? if that is pls say or tell me the right 1
Homo sapiens programmiens- A solitary, red-eyed mammal which often talks to inanimate objects.
which discusses a number of strategies for starting with microcontrollers in some detail. It does include mention of the Parallax Basic Stamp, Arduino, and other "entry level" alternatives...
http://www.2dkits.com/zencart/index.php?main_page=product_info&products_id=6