red/green 8x8 matrix ; common-anode rows

Hi...

...I was looking at this page in the playground...

http://www.arduino.cc/playground/Main/MultiplexMAX72xx

....it employs a common-cathode row matrix, but the situation is
such that all of the cheaper red/green matrices available have a
common-anode row arrangement....

...I was mucking about with the circuit as is, and to deal with the
different row polarity, used uln2803 source drivers on the column lines,
and a single udn2981 to supply the rows....

...strangely, with the sketch provided, things didn't quite work as
expected, with every alternate row (4 out of 8) being energized is the
first section of the sketch...I've no idea why....

...I do realize the udn2981 has a 10us offtime, but I don't think that's
the cause of this issue....anyone have any clues?...

note: max7219's were used ; perhaps the difference is there?

Cheers!

uln2803 source drivers

These drivers sink current, not source it.

florinc:

uln2803 source drivers

These drivers sink current, not source it.

...absolutely correct, apols for the blatant lack of attention on my part.
That para should have read...

"...I was mucking about with the circuit as is, and to deal with the
different row polarity, used uln2803 drivers on the column lines, and
a single udn2981 source driver to supply the rows...."

Thanks for pointing that out!

Cheers!

I built a LED matrix shield that could take (with little change) both common anode and common cathode RG LED matrices.
Here it is, if you need inspiration:

Thanks for the pointer, unfortunately my particular usage does not see me with
8 spare digital I/O lines to drive the rows with =) That said and considering the
way you've designed the shield, inspires me to look again at the original circuit
I've been using, paying close attention to what, exactly, is happening with the
common anode drive lines on the pair of max72xx'a ... somehow, I think that's
where things are going wrong here....

...nice looking shields btw ; with the abundance of cheap, common-anode row
red/green matrices 'out there', it kind of surprises me that there's so little
about ... relatively speaking... covering usage ideas for these types of devices....

Cheers!
Don

Maxim has an application note on using the MAX7219/7221 with common anode vs common cathode parts

Ah, thank you ... I haven't got around to looking at things again yet (that
time of year, we all know how it is =). but now that you've saved me the
legwork to find that appnote, it more sures me I'm looking in the 'right
place'. That is, looking at the original post I cited at the beginning of this
thread, you read ;

"Note that the MAX7221 is definitely preferred over the MAX7219 for this
technique. This is because in shutdown, the MAX7221 digit drivers are high
impedance, rather than V+ as in the MAX7219."

..as the circuit entertains paralleling the digit outputs of both max72xx units
(max7219 in my case), and alternately switching between chips (to obtain the
2 colors). According to the application note ;

"The digit drive outputs of the MAX7219/7221 are power switches which go
active low one at a time to turn a digit on, and high impedance when off."

... so that suggests the digit outputs behave identically on the 2 versions of
max72xx 'when it's operation' ... but because things are toggling the
chips in & out of shutdown, it may be just a machination of timing that the
shutdown sequencing is holding the anode driver input high when it should be
switching active_low by the -other- max72xx (and the coincidence of timing
has it appear as alternate rows being energized)....

...not that I want to use discretes, but I do have a bagful of irfu9024 pfets
to do some checking with, but perhaps the answer is to use 2 udn2981 source
drivers, and then parallel the outputs thereof to the rows... we'll see ... =)

Cheers!
Don

...I'm going to thank CrossRoads for pointing me back to the datasheets...

...on page 6 there's a section entitled 'max7219/7221 differences'... it reads ;

"The MAX7219 and MAX7221 are identical except for two parameters: the
MAX7221 segment drivers are slew-rate limited to reduce electromagnetic
interference (EMI), and its serial interface is fully SPI compatible." ...

..in a perfect world, that should've been on page 5 above the description table,
as it makes more sense of ;

"On the MAX7219, when a segment driver is turned off it is pulled to GND.
The MAX7221 segment drivers are high-impedance when turned off."

"The MAX7219 pulls the digit outputs to V+ when turned off. The MAX7221’s
digit drivers are high-impedance when turned off."

...no rocket science award there for figuring out how the 7221 achieves lower
EMI emissions =) It helps to be aware of this behavior wrt both the segment/digit
outputs, when using same to interface with supplemental drivers circuits...

...however, this is not where things are going wrong ; even after revising the
supplemental drivers stages back to discretes as per maxim's appnote, things
still do not work as described by the sketch. I later discovered that disconnecting
the DATAIN line between the 2 max7219's results in expected behavior for 1 color...

...so, I need suspect that the 7219's SPI-like interface differences wrt the 7221's
SPI-true implementation has something to do with this, as summarized in maxim's
datasheet as being ;

" For the MAX7219, serial data at DIN, sent in 16-bit packets, is shifted into the
internal 16-bit shift register with each rising edge of CLK regardless of the state of
LOAD. For the MAX7221, CS must be low to clock data in or out. "

... somehow, it looks to me as though the 2nd 7219 is being caught with data intended
for the 1st 7219, and the datasheet cites a 16.5 clock cycle delay on DOUT propagation,
so something here, in concert with the shutdown toggling between the red/green 7219
'banks' is going awry ...

... I posit such, because I tested the circuit with the 'LCDemoMatrix' sketch (of the
LedControl library, which the red/green matrix sketch uses), and that works 'as
expected' on one (or the other) color ; so it must be in the red/green bank switching
code somewhere ..