Main > Main Forum
Light Buttons with LED Hardware/Software - COMING SOON!!!
<< < (16/16)
cholin:
I was thinking about this all day.  If I knew a little more about what chips did what, I would be able to help.  Firstly, Trimoor will probably answer this one:  are all chips programmable at least once?  You do write your own code to the chip, right?

If so, then what we can do, is put some USB or serial interface (or both with a chip to detect activity) and from there, it will go to a chip that controls the matrix.  We can send simple text through the connection to a chip, and depending on the text sent, we can turn stuff off and on.  I don't see a need to *scan* a matrix because we're not reading information.  My idea is that a person can use a program (such as lamemame or whatever) to send a string of numbers through the serial port, like DINO said.  The main chip will read this string, and with the code we wrote into it, the chip will set some lines to high, some to low (Im assuming one side needs to be high, one side needs to be low).  This will cause a slight problem though wont it if we need to light up some LEDs in strange areas because if a line is already high, we can't set it to low at the same time, so therefore, we can only light so many at a time.  Im probably wrong, but if I had the money, I would be the first person to develop this.
tetsujin:

--- Quote from: Trimoor on March 23, 2005, 02:45:21 pm ---tetsujin, I don't quite understand your description, but if I remember correctly, PIC I/O lines actually have three states: high, low, and float.  To light an LED, set one of it's pins to high, the other low, and everything else to float.

--- End quote ---

Depends on the PIC maybe.  The ones I've used don't have that, at least I don't think so.
Trimoor:
The PIC line of microcontrollers can all be programmed many times.  You must write your code in assembly (ack!) or you can buy a ridiculously overpriced compiler.

Serial interface is trivial, USB probably isn't worth the trouble as it requires more hardware and computer drivers, and leaves out DOS.  Send a string of ASCII characters to the chip, which it interprets to determine which LEDs to light.  Send an uppercase letter to turn it on, and a lowercase letter to turn it off.  Or you could program it for larger commands such as all on/off.  All customization/LED configuration should be done at the computer end for simplicity.

The actual LEDs are either controlled by the microcontroller, or by a multiplexer.  The multiplexer will allow more LEDs, but it brings up the cost.

Scanning the matrix is necessary, but is done by the chip, not the host computer.  You won't notice a difference, but it uses many fewer ports.  This is done to eliminate ghosting.

Some of the PICs on microchip's site have up to 70 I/O lines in a $5 surface mount chip!  This might be the chip we need.  70 LEDs without a matrix, so we can use a common ground.  Or you could matricize them for 1,225 LEDs!
tetsujin:

--- Quote from: Trimoor on March 23, 2005, 04:29:38 pm ---The PIC line of microcontrollers can all be programmed many times.  You must write your code in assembly (ack!) or you can buy a ridiculously overpriced compiler.

--- End quote ---

There's also SDCC, which I use for some of my stuff:  It's a little flaky sometimes (especially for 14 bit PICs - I think 16 bit PIC support is better) but it's useful.

http://sdcc.sf.net

Assembly can be tricky until you get the hang of it.  The whole deal with branching being done by "skip next instruction if such-and-such bit is set" is one I have some trouble with.  Otherwise, though, it's really not that bad.
Navigation
Message Index
Previous page

Go to full version