justDIY
Active Member
I need some help figuring out the easiest / lowest parts count method of driving an LED array in a complex manner.
I would like to build an array that is 8 anode columns by 8 cathode rows. I need to have the array's "default" state ON rather than off. I need to be able to reverse bias each LED in the matrix. I need to be able to read the voltage stored by the junction capacitance of each LED in the matrix... I will read this voltage off the cathode side of the junction, with the anode side in a LOW state.
Right now I'm testing things with a 3x3 array... I have the anode columns driven by a 74HC595 serial shift register. I load the register with $FF, which sets the output state of each port to a logic HIGH or current source. The rows are directly attached to the tristate IO lines on my microcontroller. The default value for these ports is a logic LOW, which is the current sink.
Now the complex part. To 'read' my array, I shift a 0 across my column driver, setting a column into LOW state. Now I shift a 1 across the port in my microcontroller, briefly reverse-biasing the column that is set to a 0 state. Before switching to the next row, I set the current row's port to a HIGH-Z input state, and delay breifly, allowing the charge to transfer to the internal capacitors of the ADC module, reading the voltage stored in the LED. I then return the row to a logic LOW output, and proceed to the next row, repeating the process. Then I increment to the next column, and repeat the whole thing again. I'm using an interrupt driven routine to 'scan' the array at a very fast speed.
The problem I have is scalability. My hardware can handle the current demands of a 3x3 matrix, however, my 8x8 matrix will exceed the specifications of the 595 and my PIC. 8 leds at 20mA each requires 160 mA of current, to be sourced by the column driver and sunk by the row driver.
Here is the solution I've come up with for my anode column driver. I don't have the parts yet to test it...
**broken link removed**
I plan on using a P-Channel mosfet to provide the source current when the logic state is 1, with a diode to force the column to accept its current from the mosfet. When the logic state is 0, the mosfet will be non-conducting, and the diode should allow current to flow into the 595, acting as a current sink. The reverse bias current is very very tiny.
I am totally lost on what to do for the cathode row drivers. I know I could setup a similar mosfet 'gate?' to provide a good current sink, but how do I implement the high-z input mode.
I would like to build an array that is 8 anode columns by 8 cathode rows. I need to have the array's "default" state ON rather than off. I need to be able to reverse bias each LED in the matrix. I need to be able to read the voltage stored by the junction capacitance of each LED in the matrix... I will read this voltage off the cathode side of the junction, with the anode side in a LOW state.
Right now I'm testing things with a 3x3 array... I have the anode columns driven by a 74HC595 serial shift register. I load the register with $FF, which sets the output state of each port to a logic HIGH or current source. The rows are directly attached to the tristate IO lines on my microcontroller. The default value for these ports is a logic LOW, which is the current sink.
Now the complex part. To 'read' my array, I shift a 0 across my column driver, setting a column into LOW state. Now I shift a 1 across the port in my microcontroller, briefly reverse-biasing the column that is set to a 0 state. Before switching to the next row, I set the current row's port to a HIGH-Z input state, and delay breifly, allowing the charge to transfer to the internal capacitors of the ADC module, reading the voltage stored in the LED. I then return the row to a logic LOW output, and proceed to the next row, repeating the process. Then I increment to the next column, and repeat the whole thing again. I'm using an interrupt driven routine to 'scan' the array at a very fast speed.
The problem I have is scalability. My hardware can handle the current demands of a 3x3 matrix, however, my 8x8 matrix will exceed the specifications of the 595 and my PIC. 8 leds at 20mA each requires 160 mA of current, to be sourced by the column driver and sunk by the row driver.
Here is the solution I've come up with for my anode column driver. I don't have the parts yet to test it...
**broken link removed**
I plan on using a P-Channel mosfet to provide the source current when the logic state is 1, with a diode to force the column to accept its current from the mosfet. When the logic state is 0, the mosfet will be non-conducting, and the diode should allow current to flow into the 595, acting as a current sink. The reverse bias current is very very tiny.
I am totally lost on what to do for the cathode row drivers. I know I could setup a similar mosfet 'gate?' to provide a good current sink, but how do I implement the high-z input mode.