28129 Parallax Inc, 28129 Datasheet - Page 123

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
The pulse train is now repeating itself several times as fast as the sampling rate. So the
Stamp-O-Scope 2 display is no longer valid.
Now back way off on pot B so that all you get is a periodic clicking out of the
piezoelectric speaker. We'll want to crank pot B back up in a little while to get that tone
again, but first, let's consider what happened to the Stamp-O-Scope 2 display as the
frequency of the 555 Timer was increased.
The display shown in Figure 6-6 still showed signal activity, even though it was
erroneous. This is called aliasing. Aliasing happens when you don't sample something
fast enough to get a true representation of what's going on. Aliasing can cause problems
because sometimes the signal that gets displayed actually looks valid.
For the most part, the Debug Terminal is the limiting factor for sampling rate. So let's
make a program that allows the BASIC Stamp take turns between working at full speed
and sending messages to the Debug Terminal.
A BASIC Stamp I/O pin can be monitored to check the number of threshold voltage
crossings per time interval. The BASIC Stamp can be programmed to track these
changes once every two microseconds. The period of the sample is 2 microseconds.
From Chapter #5, we know that frequency is given by the inverse of the period:
So, the sampling rate is:
Since the sampling rate is 500 kHz, the theoretical maximum frequency we could sample
is 250 kHz. The audible sound range is between 20 Hz and 20 kHz, and the sounds we
will work with in this experiment will vary between 50 Hz and 3.5 kHz. Clearly, aliasing
is not a concern.
f = 1 / T
1 ÷ 2 x 10
When is aliasing a concern? A recommended sampling rate depends on the
characteristics of the signal being measured. Some signals are sampled just a few times
per cycle while others are sampled thousands of times per cycle.
The absolute minimum sampling rate, in theory, that can be used to gather valid signal data
is twice the frequency being sampled. When the sampling rate is less than twice the
frequency of the signal being sampled, aliasing is guaranteed. This minimum frequency is
called the Nyquist rate.
-6
seconds = 250 x 10
3
= 500 kHz

Related parts for 28129