Shop OBEX P1 Docs P2 Docs Learn Events
Seeking a 16 bit binary up-counter in a single chip package? Does it exist? — Parallax Forums

Seeking a 16 bit binary up-counter in a single chip package? Does it exist?

xanatosxanatos Posts: 1,120
edited 2012-01-12 11:13 in General Discussion
I'm needing to count 4 simultaneous, asynchronous, independent pulse trains, and read the total count only when another sensor is triggered. My current design would require I have something like 4-74LS193 counters cascaded with the outputs going into a 74LS165 P to S shift register, with four separate copies of this circuit running (one for each monitored stream), with the SR's having common D and C lines, only the latches being polled to get the count from the given counter when needed.

That's lot of chips. At the least, I'm wondering if there's a simple 16-bit binary up-counter in a single package out there?

At best, I'm looking for a 16 bit binary up-counter with shift-register outputs... :-) Am I asking for too much?

Suggestions are greatly appreciated...

Thanks and Happy New Year everybody!

Best,

Dave

PS., the count frequency is low - probably on the order of 20 pulses per second max.

Comments

  • Tracy AllenTracy Allen Posts: 6,666
    edited 2012-01-11 15:53
    Well, it so happens that I designed a 5-channel, 16 bit counter around an 8-pin PIC chip, mainly for slow pulsing inputs like rain gages, anemometers and flow meters. Link to CT515.PDF. It takes one line to a µController like the Stamp or Prop. To read out the counters (and reset for the next cycle), pulse that one line. It delivers the counts back on the same single pin, ttl level RS232 at 9600 baud. The rationale was that the Stamp in particular is terrible at that type of counting.

    Send me a PM if that is of interest to you.
  • kwinnkwinn Posts: 8,697
    edited 2012-01-11 16:04
    And if Tracy's chip doesn't do what you want how about an P8X32A? I hear it has 16 32 bit counters and 32 IO pins and is very versatile ;- )
  • xanatosxanatos Posts: 1,120
    edited 2012-01-11 16:07
    Hi Tracy,

    That looks fantastic! Other than it resetting ALL values when it is read, it's PERFECT! I would have to keep running totals on the stamp (one channel may continue needing to count long after another channel has been read and "hung up") - but I could just keep adding subsequent partial count reads to previous counts until the "hang up" command was received, and then I could add the count and send it along to my data logger.

    PM on its way...

    Thanks,

    Dave
  • xanatosxanatos Posts: 1,120
    edited 2012-01-11 16:23
    Hi Kwinn,

    I truly would LOVE to use the propeller more, but for whatever reason (being spoiled by the BS2px maybe) - I just can't seem to wrap my head around the Propeller fast enough to keep up with design evolution in my projects, and so far, the stamps have never failed to do the job with efficiency and reliability and - one of their sales pitches - RAPID prototyping and implementation. I have a few Propeller projects that I am working on, but I have just not been able to make the utterly reliable mind-fortress of knowledge for the Propeller that I have built up for the Stamp.

    It is my fervent desire and goal, however, to this year master the Propeller such that I feel as comfortable using it as I do a Stamp.

    And as long as people have made things like the CT515 available, the Stamp remains a thing of utter awesomeness! :-)

    Best,

    Dave
  • jmgjmg Posts: 15,185
    edited 2012-01-11 16:35
    xanatos wrote: »
    At the least, I'm wondering if there's a simple 16-bit binary up-counter in a single package out there?
    At best, I'm looking for a 16 bit binary up-counter with shift-register outputs... :-) Am I asking for too much?

    This sort of obvious block, seems to have fallen between two stools.
    It missed the initial TTL spawning, as too complex, and then when CMOS came along, it was too specialized.

    The 74HC590 is maybe the closest, that has 8 bit counter plus 8 bit TS capture/latch, and you can chain them.

    There are companies making the modern equivalent of what you seek : (no one would bother with 16 bits these days...)

    http://www.lsicsi.com/counters.htm

    32-Bit Multi-Mode Counter with Serial Interface.. (14 Pins) Last Updated: 08/17/11 I found a price of $2.00/500+, which seems good.

    and these days CPLD is also a viable solution, with offerings like
    LCMXO2-1200ZE-B-EVN
    for $29, you can pack a shipload of counters into that... :)
  • Heater.Heater. Posts: 21,230
    edited 2012-01-11 16:38
    Sounds like an ideal project for one to start building up that "mind-fortress" of Propeller knowledge with. At those slow data pulse rates you might be able to do the whole thing in Spin without having to get into the complexity of counters or assembler language straight off.
  • xanatosxanatos Posts: 1,120
    edited 2012-01-11 16:46
    Hi Heater, Love to, but I'm building several of the original style systems while developing the new system, and I need the new ones ready to go out the door probably by the end of the month.... zero time for learning curves in Spin at the moment, but once the new designs are into production, then I'll have time to jump back into the spin bin! :-)

    Dave
  • kwinnkwinn Posts: 8,697
    edited 2012-01-11 19:10
    Hi xanatos,

    That was a tongue in cheek post I just couldn't resist making. I figured you had a pretty good reason for going with discrete chips, and it makes sense to use what you are familiar with when you have a tight schedule. FWIW though I did use 3 props to replace 16 AM9513APC scaler chips on a 20 well gamma counter. Worked very well and the 3 props cost just over 1/2 of what a single AM scaler chip would have cost.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-01-11 19:21
    xanatos wrote: »
    I'm needing to count 4 simultaneous, asynchronous, independent pulse trains, and read the total count only when another sensor is triggered. My current design would require I have something like 4-74LS193 counters cascaded with the outputs going into a 74LS165 P to S shift register, with four separate copies of this circuit running (one for each monitored stream), with the SR's having common D and C lines, only the latches being polled to get the count from the given counter when needed.

    That's lot of chips. At the least, I'm wondering if there's a simple 16-bit binary up-counter in a single package out there?

    At best, I'm looking for a 16 bit binary up-counter with shift-register outputs... :-) Am I asking for too much?

    Suggestions are greatly appreciated...

    Thanks and Happy New Year everybody!

    Best,

    Dave

    PS., the count frequency is low - probably on the order of 20 pulses per second max.


    TI has the 74F676, it may be what you are looking for, but rechecking prior to my reply basically confirmed that there is not much of a market for 16bit chips. So they will not be as readily available through Digikey, newark elex etc. May need to go direct to OEM and get hung up on lead times.

    An alternative may be two hct590s cascaded for 16 bits.

    FF
  • jmgjmg Posts: 15,185
    edited 2012-01-11 20:36
    There is also a 74LV8154 from TI, TI says 60c/1k and that can count/capture 2 x 16b, so you would need 2.
    DIPs seem cheaper at disti's than TSSOP, maybe older stock ?
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2012-01-12 00:21
    A related issue is debouncing, and that was another factor that led me to make the design of the 5-channel PIC counter, CT515. Being for environmental sensors, it would have to deal with bouncy magnetic reed switches, and the multiple hits can wreak havoc with standard high speed counter chips.

    It is a point well taken about using the Prop. Cog counters are not suitable if debouncing is called for, but a dedicated cog would be perfect to handle the task of multiple channels of debounce and count. My PIC algorithm runs a loop with vertical counters in parallel, a state machine.

    I still might choose to use my external chip in a system integration, so as to save Prop pins and also a cog for something else if those resources are tight. The PIC also offers wake-up on change that keeps it asleep when nothing is going on (think no rain, no wind, lazy flow).
  • LeonLeon Posts: 7,620
    edited 2012-01-12 02:28
    One of the tiny 6-lead PIC10 devices might be suitable.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2012-01-12 10:14
    Yes, a PIC10 would allow 3 counter/debouncer channels with one pin for the cpu connection.

    Here is a photo of a system I built that scans 20 rain gages and two anemometers, using 6 of the CT515 counters attached to an OWL2pe (BS2pe) data logger. This is being used in the area affected by the Fukushima nuclear disaster to monitor runoff into watercourses. The interface chips are socketed in case anything damages them.


    rain20.jpg
    720 x 540 - 118K
  • xanatosxanatos Posts: 1,120
    edited 2012-01-12 11:13
    Nice board. I like that you socket the chips - I socket everything with more than four leads, although given that there will be a total of 16 TLP781 OptoIsolators that could get cooked occasionally, I'll probably socket them too! :-)

    Great speaking with you today, looking forward to developing with those CT515s.

    Dave.
Sign In or Register to comment.