Have a need to count interrupts without waking the uC on every interrupt. As such, this has me looking at binary counter ICs.
Counter wise, 12-16 bits is fine (16-bits preferred), though for flexibility’s sake, carry ability to serialize the count would be a plus. Meaning, chaining to create a 24-32 bit counter. That's actually been easy to locate. Here's the catch. Is there such a device which supports a serial interface (i2c, spi, one wire) such that the uC can query (optionally reset; reset pin is fine) the current count? As an alternate solution, I've looked at using a shift register as the interface between the uC and the counters. But this seems like something which would be common. Which makes me think I'm going about this all wrong, and the hard way.
So please point me in the right direction. What can you guys recommend?
Telecommando that does sound like what I'm looking for. I went to octopart and entered the part number. Seems none of the normal suppliers offer it and all the links there are asking for contact information for a quote. Have any idea what price is in quantities of 1 or 2; including shipping?
Thanks for the link. I'll check out the datasheet to make sure it works the way I'm wanting. Hopefully this proves to be a good (features, price, and availability) solution.
In the meantime, if anyone else has suggestions, please feel free to post.
Wouldn't happen to have any US suppliers would you? I'm not even sure which specific model I needed there. They list three different LS7366 models, each with a different price. The data sheet does not seem to specify model number based on package. No idea which I'd want in dip. Quick back of the napkin plus assumption places those around $6 each, plus shipping from the UK. I was hoping for something less expensive. I can certainly beat the price doing it the "hard way."
Edit: I see your $4 update there.
Just popped in my head. Here's an oddball notion. What about something like an attiny, running on internal clock at 5v. I know lots of those have a USI and some have SPI (assuming slave mode) interface. Could likely use one tiny for both of my counters. IIIRC, their power usage is pretty low but not pragmatically sure. IIRC, some of the tinys can be had for less than a buck and are easy to come by. This sound like something worth further investigation? One of the potential advantages here is I could even add debounce logic in software on the tiny. What you guys think?
Just popped in my head. Here's an oddball notion. What about something like an attiny, running on internal clock at 5v. I know lots of those have a SPI (assuming slave mode) interface. Could likely use one tiny for both of my counters. IIIRC, their power usage is pretty low but not pragmatically sure. IIRC, some of the tinys can be had for less than a buck and are easy to come by. This sound like something worth further investigation? One of the potential advantages here is I could even add debounce logic in software on the tiny. What you guys think?
I think you're on the right track, I was going to recommend a PIC just from experience. I'm pretty confident that an attiny can do it. I don't know a lot about AVR power consumption, but I know a "nanowatt" PIC can run continuously on a slow internal RC oscillator and use so little power that the shelf life of the battery is the major factor.
I looked at the ATtiny24A/44A/84A* line. It has 14 pins which is tons for my needs. When running, at 1Mhz, its 0.25mA. Idle its 0.04mA. Also believe there may be potential for sleeping, which would further drive down power. At roughly $1, this seems like a good solution. With a total of 8 or 14 pins used, including VCC and GND, it looks like it is worth additional consideration.
If anyone else has options I should consider, please let me know.
Thanks guys for your feedback and input.
EDIT: Adding, I've not ruled out the 85 series...if there is a lower power variant. Simply haven't checked. I believe an 8-pin variant may have enough pins to do everything I need...though need to think more about reset pin reallocation implications.
Thank you for the clarification. I somehow managed to miss that.
Telecommando:
But there's no reason why a PIC or ATTiny, properly programmed of course, shouldn't work just as well. It might even be better, since the LS7366 must be reset externally (either by a pin or by reloading the counters) while a PIC or ATTiny could automatically reset its counters and start over.
Same thought I had. I figured I could have it automatically reset after transfer of the counter's value. No need for a reset pin or even reset command. I'm thinking I can put the uC to sleep. Wake on INT and do its thing. I'd have three IRQ sources; one of which is the SPI SS pin. That way, the uC is woke by any of the three devices. In doing so, I believe I can make this a rather low power solution.
The more I look into it, the more I'm liking this as my solution. Its cheap, easy to find, relatively low power, and napkin math says I have tons of sample headroom for my project.