28128 Parallax Inc, 28128 Datasheet - Page 45
28128
Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet
1.28129.pdf
(176 pages)
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
- Current page: 45 of 176
- Download datasheet (3Mb)
This
NEXT
time through the value of n increments to 2, and so on until n gets to 4. After completing
the 4
the
Program Listing 2.2 has a more complicated set of commands that gets repeated within
its
DO…LOOP
P0 is low,
high, then the program executes the next line, after the
The same technique is applied with the next two lines of code (and one comment), which
repeat themselves until a low signal is received.
The command
vacant space in the rightmost bit (the LSB) is automatically filled with a zero. Then the
bit value at pin P0 is loaded into the LSB position in the nibble. This is done using the
d=d+IN0
variable d. The second time through the loop, the value that was placed in the LSB gets
shifted left by one, so it ends up in bit-1. Meanwhile the next value sampled at P0 is
placed in the LSB slot. The shift and add process is repeated four times as each bit is
shifted into the byte.
Each time a new bit is shifted in, we use the
Each time the program gets to the
command, and the value of
out of the loop.
FOR…NEXT
NEXT
FOR…NEXT
th
command four times. The first time through the loop the value of n is 1, the second
pass, the program skips out of the loop and continues on to the line of code after
FOR n = 1 TO 4
command.
conditional loop. This loop is used to check the value at pin P0. If the value of
command, which adds the single bit measured at P0 to the value of the nibble
DO
LOOP UNTIL IN1=1
DO
LOOP UNTIL IN1=0
d = d << 1
d = d + IN0
LOOP UNTIL IN1=1
'Wait for high
'Wait for low
loop, and it is different from what we've seen before. It starts with a
d=d<<1
loop executes the PBASIC command between the
shifts all the bits in
n
is incremented, until it gets to 4. Finally the program breaks
sends the program back to
NEXT
command it returns to the
DEBUG
d
left by 1. When values are shifted, the
command to display the new value.
LOOP
instruction.
DO
. If the value at pin P1 is
FOR
FOR n = 1 TO 4
command and the
Related parts for 28128
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: