28129 Parallax Inc, 28129 Datasheet - Page 81

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
Editor and make sure to save it for future use. When the circuit is built and the code is
entered and saved, run Program Listing 4.1, and let's see how it works.
' -----[ Title ]-----------------------------------------------------------
' Basic Analog and Digital - PL4_1R0.bs2
' Digital Voltmeter (DVM). D/A Converter Added
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
adcBits
v
r
v2
v3
n
' -----[ Initialization ]--------------------------------------------------
CS
CLK
DataOutput
DEBUG CLS
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
DAC:
RETURN
ADC_Data:
GOSUB DAC
GOSUB ADC_Data
GOSUB Calc_Volts
GOSUB Display
n = 11
OUTPUT 7
OUTPUT 6
OUTPUT 5
OUTPUT 4
OUT7 = n.BIT3
OUT6 = n.BIT2
OUT5 = n.BIT1
OUT4 = n.BIT0
HIGH CS
LOW CS
VAR
VAR
VAR
VAR
VAR
VAR
PIN
PIN
PIN
Byte
Byte
Byte
Byte
Byte
Nib
0
1
2
'Start display.

Related parts for 28129