Greaseweazle

Chuck Guzis cclist at sydex.com
Wed Feb 3 11:00:28 CST 2021


On 2/3/21 7:14 AM, dwight via cctalk wrote:
> I'm curious as to how the sampling code looks. Do you use the timers?
> Dwight

Exactly.  You run the sample timer in "capture" mode using DMA.  There's
a little trick in this when handling high-denisty fisks in thatthe DMA
counter is limited to 65K "items" (bytes, words, doublewords), so
there's a small amount of trickery to get more than 64K samples (grab
the DMA TC interrupt and restart the transfer 64K down the line).  Other
than handling the interrupts, the MCU is sitting around staring at navel
lint.

The reason for using the faster F4 MCUs is the higher clock rate (I
clock the sampling timer at 14, 28, 33 or 56 MHz) and the memory.  Data
is stored to SD card (the F4 has full-speed 4 bit SDIO).  The F407 is
perfect for the job (and lots of others, in that it has somewhere around
40 pins of 5V tolerant GPIO).  A half-meg of program flash lets you do
pretty much whatever you want.   The same MCU that I use for my tape work.

So long as there's support for USB ACM on the host (could be changed to
serial or WiFi), the software on the PC that eventually reads the data
off of SD can be anything.

I reserve the F103 "blue pill" cheapies for more mundane tasks.   You'll
find one such published on Github by me for using the
often-on-sale-for-less-than-$3 IBM IR keyboards as standard
PS2-interface keyboards.  In, fact, the interface to the host could be
anything--USB, serial, parallel.  The keyboards are all NIB,
decent-quality rubber-dome models.

We live in today's world where MCUs are in everything, in toys, light
bulbs--you name it. The low-end OTP ones from China can be literally had
for pennies.   We are surrounded by computers to an extent never
imagined by my old EE Prof whom I asked what he thought about the
potential of a monolithic computer-on-a-chip.   (He couldn't see any).

Well, to his credit, I still can't find one that makes up my bed or
washes my windows.  I suspect that those too, are mostly a matter of time.

--Chuck




More information about the cctalk mailing list