Figure 5. ADC0832 Timing Diagram.
The program simply loops through both channels in
each of the two operating modes, displaying the raw counts
and calculated voltage output as before. Figure 6 shows the
results. If you look very closely at that display, you’ll notice
that the differential mode differs from the single-ended mode
by about two counts — this had to do with a noisy test set-up
and I could never really get a single-ended reading to hard
zero. Finally, Figure 7 shows you the result of an experiment
of mine with the ADC0832 set-up. I recently purchased a
digital scope/logic analyzer and I hadn’t had a chance to use
the logic analyzer portion of it. So, I connected three probes
(one each for CS, Clk, and Dio) and captured a part of the
transmission that corresponds to the values in Figure 6.
What’s interesting to note is the spacing between
the configuration bits versus the data bits. Why do you
suppose this is? If you go back and look at the subroutine,
you will see this line:
Figure 6. ADC08x32 Output.
SHIFTOUT Dio, Clk, MSBFIRST, [%1\1, sglDif\1,
projects will come faster. That said, don’t be afraid to try
little things, as lots of little things add up to greatness.
Allow me to wish you and your sweetie a Happy
Valentine’s Day. (Guys, robots do NOT make cool gifts —
unless your girlfriend is an engineer or reads Nuts & Volts
and SERVO Magazine. Remember, chocolate still works.)
And, until next time, Happy Stamping. NV
This is actually quite complicated.
We’re asking the BASIC Stamp to send
one bit of a constant value, then go
retrieve a variable and send one bit
from it, then go get another bit and
send a single bit from it. This explains
the wider timing between the clock
pulses going out versus the pulses for
the data coming in (which only has to
deal with a single variable).
I’m leaving it up to you now — go
forth and EXPERIMENT! Remember
that Rome wasn’t built in a day and neither will all of your projects. What you’ll
find is that — after you’ve experimented
for a while — your internal knowledge
base will grow to the point where
Figure 7. ADC08x32 Scope Capture.