28128 Parallax Inc, 28128 Datasheet - Page 60

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
The
This is the first clock pulse, and all it does is tell the ADC0831 to start converting on the
next clock pulse. Because of this, we don't need to check for input from D0 after this first
clock pulse.
Since we set the clock low just before this command,
high-low signal. The duration of the high segment is twice the number specified in the
PULSOUT
duration of this high segment is 2 us × 210 = 420 us.
The command
takes care of all the synchronous serial communication so that we don't have to program
it as we did in Chapter #2. In effect, this command sends clock pulses to the ADC0831’s
CLK input and reads output bits from ADC0831’s D0 output. This command also loads
each of the ADC 0831’s output bits into the
The
general format for the command is:
In our case, the data pin is
is used to reference BASIC Stamp I/O pin P2 in this program. Likewise, the clock pin is
CLK
P1. The mode in this case is
used in this command. It indicates that the ADC0831's output bits are ready after the
clock pulse's negative edge, the transition from high to low. It also indicates that the bits
are transmitted in descending order, starting with the MBS. [adcbits\8] means the data is
shifted into the
, which is a constant equal to the number 1, and it references BASIC Stamp I/O pin
SHIFTIN
PULSOUT CLK, 210
SHIFTIN DataOutput,CLK,MSBPOST,[adcBits\8]
SHIFTIN data_ pin, clock_pin, mode, [variable\bits]
command, in microseconds (us). 1 us = 1/1,000,000 of a second. Therefore the
LOW CLK
PULSOUT CLK, 210
command is discussed in more detail in the BASIC Stamp Manual, but the
SHIFTIN D0,CLK,msbpost,[adcBits\8]
adcBits
variable, and 8-bits are expected.
command sends a clock pulse to the ADC0831's CLK input.
DataOutput
MSBPOST
, and it's one of four transmission modes that can be
, a constant equal to the number 2. This constant
adcBits
byte.
PULSOUT
is a powerful instruction that
sends the desired low-

Related parts for 28128