16 bit counter chip ?

so , i need a chip that would have a 16bit address , that i would be able to increment continuously via a clock signal or something like that . like a counting chip or counter chip .

thank you

Use a 4020 with an extra 4013 stuck to it to get the 16 bits.

// Per.

thank you very much :) , the first chip is clear , though can you please explain to me the use of the second chip ?

The second chip gives you two extra flip-flops - e.g. the extra two bits you need to get to 16.

// Per.

but in the datasheet of the first chip , it only has 12 output pins , it says it's a 14 stage binary counter but has only 12 parallel output pins . and what if i need more ? like 17bits for 128k of data ?

The SN74LV8154 is a dual synchronous 16 bit counter with a byte-wide output bus - you can snapshot the counters and then read the two halves of each via the 8 bit bus.

Its available DIP and SMT too

hey Mike , thank you .but i am working with an external ram that has a full 16bit bus , so i need all 16bits present all together at once , though the ram is a 128k one , so i technically do need an other bit , the correct number would be 17bits , so i think two chips working together might be needed

Arguably, if you are using an Arduino to orchestrate things and speed is not critical, you could use two 74HC595s and set up whatever address you wanted each time.

Otherwise, two 74HC590 or two 74HC4020 if you don't mind clocking at 16 times the count rate. :astonished:

hey Paul , i dont think a 595 is suitable for this , as a matter of fact i am using a 595 to , but for something else . with spi at 16mhz i managed to output a byte at 21clocks , though here i need the ram to work in blocks but really fast , so i must move from a byte to another in 1clock

though what does clocking at 16 times the clock rate mean ? and why ?

i liked the 4020 that Zapro presented at first best , though i need 17bits .

You will almost certainly need to chain two chips. The problem with the "4020" is that the second and third outputs are missing, so if you want all 17 address lines, you would have to feed it 16 clocks just to step the usable 17 bit address - the same problem as using shift registers.

Clearly you will need to work out how to use two 74HC590s in tandem.

yeah i did notice that . how do i set the carry in between the chips though ? +i must have a single clock pin that increments the whole thing

amine2:
how do I set the carry in between the chips though ? +I must have a single clock pin that increments the whole thing

You take the clock of the second chip from the final output of the first.

Let me take another look …

In fact, it has a special Ripple Carry Output pin to do this; the instructions explain exactly how to do it.

amine2: so , i need a chip that would have a 16bit address , that i would be able to increment continuously via a clock signal or something like that . like a counting chip or counter chip .

thank you

Anyway what are you actually trying to do? There might be a completely different approach if you explained...

hey Mark , i am working with an external RAM , when i access the RAM it usually is in blocks and there is a pattern followed each time , i start with the first address of the ram and then increment untill a 17bit limit (fully read it) . at the time i am doing it with the microcontroller (Mega) , i manually increment the address , but a good friend (Grumpy_Mike) requested something even better . by adding in a hardware counter , i would only have to supply a correct clock signal , that can be done with a hardware timer , like that i can have free processor time and some pins for good use :) .

Can you use SDRAM? That auto-increments in burst-read mode.

A chain of 74HC393's will do you a counter chain, albeit with ripple-skew

hey MarkT , a 74HC393 sounds interesting but why not a 74HC590 (suggested by Paul)

If you just want a ripple counter the 393 is a useful device, being dual 4 bit its useful for other things too such as clock dividers. The 590 has a latch so its outputs don't change unless you clock the latch too.

So do you need synchronous counter or will ripple do? Have you some idea of the timing requirements?

well i will indeed need 17bits present all at once , so i will need a chain of counters . i can output any clock frequency or any signal out of the avr i think , so that may not be a problem . i need the solution that would use a minimal number of pins for a 17bit counter . as for programming that would not make a problem i think .