Electronic – Loading a shift register without displaying its contents/output

atmelattinyledled-matrixshift-register

I'm making an LED matrix using two DM7495N 4-bit shift registers and one 8-bit shift register. The 4-bit registers are for the anode columns and the 8-bit connects to transitstors controlling the cathode rows. The matrix is 8 by 8. This setup is necessitated by the attiny85 I'm using as the microcontroller, which does not inherently have enough I/O pins to control an 8 by 8.

My idea is to rasterize the matrix, by loading one of the 4-bit registers, while the other is displaying its contents, then switch and keep going through the whole matrix in that fashion. That way, I can keep 4 LEDs on at a time to preserve overall brightness of the matrix. The only problem is that I can not think of an easy way to load one of the 4-bit shift registers without simultaniously displaying its contents, which would display as giberish on the finished matrix.

The attiny85 has 5 I/O pins, unless you count the reset pin, which I would prefer not to use, since it would require high/low voltage programming in order to reprogram the microcontroller. I am using one of the 5 I/O pins to control the data coming into the all three shift registers. Three more pins are being used to control the serial/shift pins of the individual shift registers. That leaves me with one free I/O pin.

Is there any easy way to control which 4-bit register is displaying and which one is loading with that last pin? I have thought of using a not gate and some extra transistors to control which 4-bit register is recieving a higher current on its VCC line, so that it may be recieving enough current to recieve serial from the microcontroller, but not enough to power any of the LEDs that it is connnected to. Would that work? I'm kind of a noob with shift registers and electronics in general, so I'm not sure.

The other way I have thought of is to simply have a transistor for each output of the 4-bit registers, controlling the flow of current to the anode columns. The not gate would control which transistors are saturated depending on which register is displaying and which is loading (The input to the not gate would also be connected to the bases of four transistors corresponding to a 4-bit register and the output of the not gate would be connected to the bases of the other transistors corresponding to the other 4-bit register).

Both of these approaches would require a fair number of transistors, which I would like to avoid, considering that I am somewhat constrained on space. Sorry if this stuff is hard to visualize. If that is the case, then I could try making a schematic. I have never tried making a schematic before, but I could try. Any ideas as to how I could accomplish the effect I want, in the simplest way possible would be greatly appreciated, or just any other insight! Thanks!

Best Answer

You can clock that shift register at up to 25Mhz.

Realistically, if you you get everything set up in your code right just, you should be able to load up the registers quickly enough that the transition state is not visible on the LEDs.

You might want to use the SPI hardware to drive the register that would be visible during the transition states (to change the other invisibly, just set the visible one to 0000 before updating).

Here is a trick that will give you maximum shift speed on the visible register...

https://wp.josh.com/2015/09/29/bare-metal-fast-spi-on-avr/