Go Down

Topic: Using 74hct164 with arduino (Read 1 time) previous topic - next topic


I want to use two 74hct164 8 bit shift registers to control two 7 segment displays. I found that these registers don't have the ability to latch output like the hc595. I want to count up 0 to 99 and then count down based on a condition. Now the problem is I don't know to code for this task using shiftout function.
I am thinking of cascading the two ic's by connecting the 13th pin of the first to 1st pin of the second ic
Also, the data sheet says that "Data shifts one place to the right on each LOW-to-HIGH transition of the clock (CP) input" . So if I am sending the data 01111111 should I switch the clock low and high 8 times so that all the bits gets shifted and I can display 0?



Why the 164 shift registers?    or do you have a bag of them.

Have you considered the TPIC6B595 ?, which has latch, blanking for PWM, and can drive massive 7seg displays of 150mA per segment.

You can use simple Shiftout.

Just a thought


I don't know to code for this task using shiftout function.

They are identical to hc595, without the latch function - doesn't make a difference to your eyes as they shift so fast.


Ok, but can someone answer about switching the clock pin low and high 8 times to completely shift a 8 bit data into it?


The answer is yes but that doesn't matter to you as you are using the shiftOut().


With Shiftout, you take the latch pin low and the library takes care of the clocking the byte through the shift register ( while leaving the existing display showing )
You just tell it if you want msb or lsb first ( the right way works, the wrong one gives gibberish )

When you take the latch pin high again, the new display immediately replaces the previous display.


But boffin, pls note that the 74hct164 does not have a latch pin.
So i guess, it's only shiftout(datapin,clkpin,order,data);


Right, I have looked at the data sheet and wonder why you want to use these chips?  They can only sink/source 25mA at 5v, so limit the size of the 7 seg display.

It looks like you would have to clock the data through while the segments are on.


I'd ensure you have good decoupling on the 74HCT164's, vital when switching lots of LEDs.  1uF ceramic on each chip's supply (as close as poss).  And don't forget current-limiting resistors for each segment.

BTW why HCT?  HC family is the normal choice for cmos logic, HCT is strictly limited to 5V supply whereas HC will run from 2 to 6V.
[ I won't respond to messages, use the forum please ]

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.

Thank you for subscribing!

via Egeo 16
Torino, 10131