Author Topic: 20 bit up/down counter, anything more elegant than a bunch of cascaded 4516's?  (Read 2715 times)

0 Members and 1 Guest are viewing this topic.

Offline JesterTopic starter

  • Frequent Contributor
  • **
  • Posts: 874
  • Country: ca
I need to build a 20 bit, binary up/down counter.

I don't need preload, but I do need all the bits, so 4040 etc. won't work.

I suppose I can cascade a bunch of 4516's, just messy with only 4 bits per chip. The 74...869 is 8 bit, but they are really expensive. There must be a better solution other than programming a small uC?

I feel like I'm missing something even after searching up/down counters with google.

 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14541
  • Country: de
I don't know common up/down counters with more than 4 bits. There are difference version how up/down are combined.
The 4040 has all the outputs for 12 bits - however it is just a simple counter, no up/down.

As an alternative to a µC, there are also CPLDs, programmable logic chip that should be capable to do up/down counting for quite some bits.
 
The following users thanked this post: Jester

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6063
  • Country: de
I agree, the 4516 (or 74HC types) are probably the solution if you want to avoid CPLDs. At least they're cheap :)
 
The following users thanked this post: Jester

Offline scuzzyTerminator

  • Regular Contributor
  • *
  • Posts: 63
  • Country: us
A parametric search at digikey found these 8-bit devices pretty quick. Is TTL OK?

SN74AS867, SN74AS869
: http://www.ti.com/lit/ds/symlink/sn74as867.pdf

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6063
  • Country: de
A parametric search at digikey found these 8-bit devices pretty quick. Is TTL OK?

SN74AS867, SN74AS869
: http://www.ti.com/lit/ds/symlink/sn74as867.pdf

Read the OP. He already found those...
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3399
  • Country: us
I agree, the 4516 (or 74HC types) are probably the solution if you want to avoid CPLDs. At least they're cheap :)

74HC4516 isn't available.  I think 74HC193 is the best HC option.
 
The following users thanked this post: Jester

Offline fchk

  • Regular Contributor
  • *
  • Posts: 246
  • Country: de
A LCMXO256C-3TN100C is available for 2.58$ and has more than enough logic blocks for your task. It's TQFP100, so hand-solderable.

There are even cheaper ones, but these are BGA packages and difficult to solder at home.

 
The following users thanked this post: Jester

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
XC9536 CPLD is $1.96 in single quantities and comes in a 44 pin TQFP package. As an added bonus it is available on inexpensive Chinese dev boards.
 

Offline xyrtek

  • Regular Contributor
  • *
  • Posts: 65
  • Country: us
Is this elegant enough?

Hope you are proud I had to dig through old project boxes.
 
The following users thanked this post: Jester

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1319
  • Country: gb
    • bitdynamics
How fast do you need to count?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15012
  • Country: fr
There's the 74LS491 which is 10-bit, but available nowhere except brokers. Not cheap either. I've found some for about $5 each, but this is clearly not a viable solution if you need regular supply.
I've also found the SN74LV8154 which is interesting but doesn't seem to do down-counting, and the counter register(s) are available through some kind of MUX, so that may not be practical for your application if you need all 20 bits at once. Haven't found/or don't know of any other current and available IC for your requirements.

Is this going to be a product? If so, frankly, a small CPLD would likely be the cheapest and best long-term solution, and depending on the other logic parts in your design, may even allow you to significantly reduce the parts number. If you're uncomfortable programming one, I'm sure people here can give you source code for it (a few lines of code should do the trick) and programming tool's cost shouldn't be an issue at all. If it's going to be only a prototype (or a few of them), then I'm not sure I see the problem with parts that are around $5 or even $10 (yes very expensive for what they do, but the time you used for finding alternate solutions is probably worth a lot more 8) ).
 
The following users thanked this post: Jester

Offline kony

  • Regular Contributor
  • *
  • Posts: 242
  • Country: cz
XC9572XL. Few lines of verilog, almost fully remappable pinout, under a 1$/pc even in small qty and with space to spare for other glue logic still. Or any other flavour of CPLD.
 
The following users thanked this post: Jester

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3399
  • Country: us
XC9572XL. Few lines of verilog, almost fully remappable pinout, under a 1$/pc even in small qty and with space to spare for other glue logic still. Or any other flavour of CPLD.

For those who have experience with these CPLDs, how many macrocells does it take to implement an up/down counter stage?
 
The following users thanked this post: Jester

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9162
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
XC9572XL. Few lines of verilog, almost fully remappable pinout, under a 1$/pc even in small qty and with space to spare for other glue logic still. Or any other flavour of CPLD.

For those who have experience with these CPLDs, how many macrocells does it take to implement an up/down counter stage?

Download the free version of ISE and try compiling a design yourself.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: Jester

Offline kony

  • Regular Contributor
  • *
  • Posts: 242
  • Country: cz
Just did it for a hell of it - gated up/down counter with synchronnous reset is 20 marcocells (that is less than 30% of the resources of the XC9572XL).
« Last Edit: December 31, 2018, 05:29:40 pm by kony »
 
The following users thanked this post: Jester

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3832
  • Country: de
XC9572XL. Few lines of verilog, almost fully remappable pinout, under a 1$/pc even in small qty and with space to spare for other glue logic still. Or any other flavour of CPLD.

For those who have experience with these CPLDs, how many macrocells does it take to implement an up/down counter stage?

One cell of these is one flip-flop + some logic, so one bit of the counter ~ 1 cell. 9572 has 72 cells, there is also 9536 with 36 cells only (slightly cheaper but may not fit a 20 bit counter).
 
The following users thanked this post: Jester


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf