binary counter on an eight-bit bus.
This whole wind thing began with Screenshot 8. I
created Bus 0, which consists of bits 0 through 7 of the
Discovery’s GPIO subsystem. As you can see, there are
many data formats available to choose from. This is a no-brainer. We want a binary counter that counts from bit 0
up. So goes our display format selection.
The binary counter option is selected in Screenshot 9.
Note that we can also create a Gray or Johnson counter.
Here’s another advantage of using the
Analog Discovery. If you don’t have a
clue of how a Gray or Johnson
counter works, just select it and a
logic analyzer preview will appear. The
same goes for the walking counters.
The output selection is based on the
fact that right now nothing is
connected to Bus 0. There is no need
to select OD (Open Drain) or OS
(Open Source), which means we will
need to add some resistors to the bus.
So, PP (Push Pull) will work just fine.
The frequency is arbitrary.
However, choosing 256 kHz
means that the complete byte count
(0 to 255) will complete every
millisecond. You can see this time
relationship in the analog emulation
view of Screenshot 7. Thus, the wind
kicked up by the binary counter
results in analog dust.
To get a true sample of the dust,
we must turn some hardware into the
wind. We’ll keep it simple and arrange
some precision resistors to form an
eight-bit DAC. Schematic 1 is a simple
R-2R resistor ladder. I lashed up the
R-2R DAC circuit and connected the
Analog Discovery to the resistor
ladder as shown in the schematic.
The oscilloscope image captured in
Screenshot 10 is exactly what we
expected. The R-2R resistor ladder
excited by our eight-bit counter
clocked at 256 kHz results in a 1 kHz
A Book in a Black Box
The Analog Discovery allows you
to think it and then immediately do it.
Using it is analogous to having an
interactive copy of Horowitz and Hill’s
book, The Art of Electronics with you
at all times in your design cycle. NV
■ Schematic 1. This is a very crude way to convert digital
to analog. However, as you can see in Screenshot 10, it
works very well when constructed with 1% resistors.
76 November 2013