My 74164 Isn't Counting Correctly.

Thread Starter

ajm113

Joined Feb 19, 2011
174
I've wired up a 74164 and for some odd reason I'm not getting the results I'm expecting...

Basically I have the CLK pin connected to positive connection with a resistor between and so far it wont count, but if I connect a floating connected wire to CLK or CLR. It works. 0.o

But only for a little bit and then it stops and it wont do it again until I restart the IC.

I also find it odd that the IC will randomly pick a number when it starts back up and after it counts one, it jumps to 255 after a second.

P.S I have the output pins connected to LEDs and do I have to connect CLK to a waveform such as a triangle wave or square wave just so this IC works?

Did I fry the IC or something?

http://www.jameco.com/Jameco/Products/ProdDS/49681TI.pdf
 

bloguetronica

Joined Apr 27, 2007
1,541
The CLK (clock) is not connected to Vcc (with or withour a resistor), but to the output of a clock generator. You will need to input a square wave of some kind so the chip can count. If you leave the CLK pin floating, it might pick up some noise and count for some reason. That might explain that behaviour.

P.S.: Don't worry. Your chip is not fried.
 

SgtWookie

Joined Jul 17, 2007
22,230
Yes, you can use a 555 timer.

I suggest that you use a CMOS 555, like a TLC555 or ICM555. Radio Shack sells a TLC555 if you don't have a quick way to get one.
 

Thread Starter

ajm113

Joined Feb 19, 2011
174
Oh never mind, yes I can. <_<

I just tried it out, all I need to do at this point is getting my PIC to use it so it can send/recive data to my EEPROM.

Thank you everyone!
 

Thread Starter

ajm113

Joined Feb 19, 2011
174
May I ask how I would do that? I just want to make sure I'm thinking the same thing you are, since this is my first crystal I'm playing with a PIC.

What I had in mind was setting a pin high and low after going through a "processing" loop.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Use a PIC I/O pin set to digital output. Connect that pin to the 74164 input. When you want to get data from the 74164 into the PIC, issue however many clocks you need to do to get the data.

If you clock the 74164 with something else like a 555 timer, the PIC won't know about it. It will be an asynchronous clock. You want to control the 74164 with the PIC.
 

Thread Starter

ajm113

Joined Feb 19, 2011
174
Wow, I answered my own question again. <_< Yeah I think I'm going to put my questions to the side until I really come to a dead end.

Yeah thats what I had in mind, I'm basically recreating a cheaper and smaller version of the first computer using a PIC 16F, Shift Registers, EEPROM, LEDs, and switches for fun to have sitting on my desk or to show people. ;)

Originally I was hopping to use a 8bit counter to do the work of looking at a address, but I decided to give shift registers a try, and hopefully get them to do cooler things.
 
Last edited:

Thread Starter

ajm113

Joined Feb 19, 2011
174
Yeah I have it doing that right now as we speak. Outputting the number of times in binary code, though one small issue is that the shifting registers will turn a LED on for a split 100 millisecond, so it creates this flickering effect on the LEDs I dont want to have on. Is there a way to solve this with this IC so it wont output anything until I tell it too?
 

SgtWookie

Joined Jul 17, 2007
22,230
You might look at a 74HC595 instead. That has latching parallel outputs. You crank the data across, and then latch it when it's where it should be.
 
Top