High-speed bidirectional counter

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

High-speed bidirectional counter

Post by GTBecker »

I've been recording bats flying along the canal for a few years with multi-element electret mics I've built. The stereo audio makes its way through a quality preamp and USB sound module at 192kHz/16-bits to a Raspberry Pi 3 where it becomes a directory of files in a wav-like timestamped format.

The mics have been usable but not ideal for ultrasonics. Knowles produces a mic that interests me; it contains a 1-bit sigma-delta ADC that can be clocked to ~5MHz. http://www.knowles.com/eng/content/down ... LU4H-1.pdf

I'm thinking that I can avoid the analog domain altogether by integrating the 1-bit PDM stream to a 16-bit value and making that look like a soundcard stream to hand off to the RPi for processing.

I think that's easily done in CMOS TTL with a clocked bidirectional 16-bit counter, then latched and read in 16- or 8-bit parallel. Better, can one of the AVR timer/counters do the counting? The mic output is clock and data; the data line determines count direction on the fall of clock. Is that possible?

Hope everyone is well in this quiet group.


Tom
Tom
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

I asked:
> ... can one of the AVR timer/counters do the counting?

It appears that the event system of an XMega processor can, indeed, route a pin to clock a counter and route another pin to set the count direction. And further, two 16-bit counters can be cascaded to form a 32-bit counter.

Every time I dig back into them, I am impressed with the sophistication and power of these machines.


Tom
Tom
Post Reply