LED matrix board with HC164 chips

i have a led display board from a dlink 24port Ethernet switch. the board has 3 4x4 led matrix on it and is driven by 6 chips believed to be HC164.

the chips have on them: (texas instruments symbol 1st then) 38 EYF 5K HC164

i found this datasheet: linky to pdf

and its interfaces with a 16 core ribbon cable,. 7 or them seem to be gnd and 3 of them +V witch leaves 6. 3 of those are connected to the clock pins (pin 8, 2 chips share one of the 3 cable pins), the other 3 pins are connected to pin 1 on 3 of the chips and those 3 chips are connected to the other 3 chip's pin 1 via pin 13. so each pair of chips controls 1 4x4 matrix.

thats all i can gather from this board by looking at it. anyone know how i can use this? it would make for a nice looking sound level meter or scrolling display :)

will post pics soon.

This chip looks to me almost identical to the 74HC595 chips, but minus the latch. So a minor change to any code for a 595 should work.

well im a complete noob when it comes to most chips, especially shift registers O_o i have never dealt with any other way of controlling LED matrix other than direct from an ardiuno, and that was using code i didnt write.

Shift Registers are dead easy to use.

You basically sent it a byte (8 bit integer) one bit at a time, then send those 8 bits out simultaneously. Hence serial in - parallel out.

They have 8 outputs, one for each LED (or row/column if you are usign a matrix). You have 3 outputs from the Arduino going into the data, clock and latch pins of the Shift Register.

You set the latch pin to LOW. Then set the data pin to HIGH or LOW (depending on if that bit of the byte is a 1 or a 0), then you set the clock pulse to high to write that bit to the storage register, then set clock bit to low, repeat for next 7 bits. Once all 7 bits have been written to the storage register you set the latch pin to HIGH which sends the contents of the storage register (the 8 bits) to the shift register and out to the pins (there is an output enable pin too but that is not used with LED,s we always leave it low so the output is always enabled).

Read up on their usage on the forum or check out the ShiftOut tutorial on the Arduino website which explains how to use them in simpe terms.

kool thanks :) but as u said there doesnt seem to be a latch pin going on here so that might confuse me a bit XD.

well here are a couple of pics of the board :)

the single led at the end is the power led.

diagram showing pin connections..

I'll take a read of that datasheet and get back to you.

ok thnx. i downloaded a datasheet for the Texas instruments ones (these are Ti ones).

here is a link to it... new datasheet.pdf

might have the same info but i believe this is closer to the chips i have.

also more info on the way its connected up.. i found that each chip controls 2 columns on a matrix (8 led's). will try and make a small schematic for one pair later..

(edited 1st post to show the type of switch the came from..)

ok. here is the schematic showing how 1 of the matrix are connected and how the chips are paired. the other 2 matrix are the same as this..

you are seeing the LEDs from behind separated into each chips columns.

pins 2 (data2) and 9 (latch?) are un-used..

The datasheet shows it is just a standard shift register package. The lack of a latch means the data shifts along one place to the right every time the clock pulses. Data entry is done usign A1 and A2. From what I can tell you simply leave one of those 2 at HIGH and the other at LOW or HIGH depending on if you want to output a 0 or 1.

The lack of a latch means you can't lock the data and so the bits will shift along. This actually makes it easier to make a scrolling message as the bits automatically scroll along the display on each clock pulse.

kool.. i will read up and try and learn how to use the thing XD thnx for the info.

I hope my diagrams help u see what the setup is i have.. its quite small so i wont be changing anything on the board itself.

i just wonder if the scrolling will be going in the right direction, and what about he pin 13 to pin 1 thing? the chips are all smd so it will be a huge pain to desolder and stuff..

i also purchased a few cheap 74HC595 chips to play with at a later date.

i may be asking more questions if thats not a problem ;)

The LED's are wired in a weird way. I would have expected the 2 LED's to be connected to the pins sequentially. I.e. Pin 6 to left LED and pin 10 to right so that as the data shift right it was displayed on one led then the next. Instead it seems to shift up to the top. ALmost as if the LED's display from top to bottom then back up to the top.

The Pin 13 to Pin 1 thing is so that the bit falling off the end of one shift register gets entered into the data line of the next one in the chain to ensure it gets shifted along the whole chain before being lost.

Pin 9 is the reset Pin and is obviously not used.

It would be easy enough to use as a scrolling message display as all you'd need to do is squirt in your message one column at a time to pin 1 on the 1st chip and pulse the clock line.

The thing to do is to fire it up and send some data to it and see what happens. Your biggest problem is going to be getting a legible font with only 4 pixels height.

What was the display used for when it was attached to the router?

it was to show the link and activity of all 24 ports. 1-12 along the top, and 13-24 along the bottom (i think) unless it alternated odd numbers along the top and even along the bottom.

i'll do some tests when i understand what i am doing ;)

i did try putting the test sketches for the other type of chip thru it to see what happened and it did things..

the one-at-a-time sketch seemed to leave one off on the 2 columns for each chip butt he second chip seemed to have an offset..

i will play with the code and stuff and let u know what i come up with :)

ok.. i tried altering the code for the 3rd shiftout tutorial sketch to this:

  dataArray[0] = 0xAA, 0xAA; //10101010
  dataArray[1] = 0x55, 0x55; //01010101
  dataArray[2] = 0x81, 0x81; //10000001
  dataArray[3] = 0xC3, 0xC3; //11000011
  dataArray[4] = 0xE7, 0xE7; //11100111
  dataArray[5] = 0xFF, 0xFF; //11111111
  dataArray[6] = 0x7E, 0x7E; //01111110
  dataArray[7] = 0x3C, 0x3C; //00111100
  dataArray[8] = 0x18, 0x18; //00011000
  dataArray[9] = 0x00, 0x00; //00000000

i didnt change the comments tho.

The sequence seemed to go ok, but the second chips array is always one step behind, ie. when the 1st chip is on 3 leds on eadch row the second is only on 2 like so:

1110 1st chip 0111 1100 2nd chip 0011

this was the array being held on its side, to be upright the the example will need to be rotated 90 deg clockwise..

what i'm trying to work out is how do i get the data i send, ie the bits for both chips, to display without the offset. so i can get the display to be for ex.

0110 1001 1001 0110

and then to:

0110 1001 0010 1111 for example..

Yor LED's are only 4 high but the array has an 8-bit sprite. How will that work?

like i said i dont know how to use these things XD

im a total noob at it and i cant program to save my life..

but i want to learn..

is it going to be over difficult to try and use this board as is or should i attempt to desolder parts and attempt a new board?

Well it’s there and it’s free so you may as well use it. It’s just a case of getting your code to work with it. Best thing to do is to send diagnostic code out, i.e. just light one LED at a time, see which one lights, do next one, etc. see what order they appear in. You’ll work it out eventually.

thnx i'll work it out eventually ;)

i'll document my findings here anyway so anyone else who might find one of them boards can get some info on it :)