28128 Parallax Inc, 28128 Datasheet - Page 56
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: 56 of 176
- Download datasheet (3Mb)
We'll modify the code so that it also displays the decimal conversion of the 8-bit binary
number. Next we'll add some more code to adjust the number to a 5 volt scale. Make sure
your circuit is constructed correctly and your programming cable and power source are
connected, then run the program.
' -----[ Title ]-----------------------------------------------------------
' Basic Analog and Digital - PL3_1R0.bs2
' Program Listing 3.1 Revision 0.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
adcBits
v
r
v2
v3
' -----[ Initialization ]--------------------------------------------------
CS
CLK
DataOutput
DEBUG CLS
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
ADC_Data:
RETURN
Calc_Volts:
RETURN
Display:
RETURN
GOSUB ADC_Data
GOSUB Calc_Volts
GOSUB Display
HIGH CS
LOW CS
LOW CLK
PULSOUT CLK, 210
SHIFTIN DataOutput,CLK,MSBPOST,[adcBits\8]
DEBUG HOME
DEBUG "8-bit binary value:
VAR
VAR
VAR
VAR
VAR
PIN
PIN
PIN
Byte
Byte
Byte
Byte
Byte
0
1
2
", BIN8 adcBits
'Start display.
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: