130-28176 Parallax Inc, 130-28176 Datasheet - Page 198

KIT PARTS PROCESS CONTROL

130-28176

Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 130-28176

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
line equation can again be used where the change in output temperature will be 0-500 °F
(based on the transfer function of 0.01 V/°F) for the change in input value of 0 to 255.
Each change of 1 in byte value will signify a temperature change of 1.96. Since the ADC
is limited on resolution, the output will have distinct steps as you have probably noted in
many experiments.
Example Program: AdcSpanOffset.bs2
' -----[ Title ]-----------------------------------------------------------
' Process Control - AdcSpanOffset.bs2
' Tests the spanning and offset input range of the ADC 0831 using PWM
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
ADC_ByteValue
V_Offset
V_Span
TempF
ADC_CS
ADC_Clk
ADC_Dout
ADC_VRef
ADC_Vminus
' -----[ Initialization ]--------------------------------------------------
PAUSE 1000
' -----[ Main Routine ]----------------------------------------------------
DO
GOSUB ReadSP
GOSUB SetADC
GOSUB ReadADC
GOSUB CalcTemp
GOSUB UpdateSP
Temp = m(Bit Value) + b where b = 0
m = ∆Output/∆Input = ∆Temperature Span/∆Byte Value = 500 °F/255 = 1.96 °F
Temp = 1.96 °F x Byte Value
Using the same circuit as Activity #1, enter, save and run AdcSpanOffset.bs2.
PIN 13
PIN 14
PIN 15
PIN 10
PIN 11
VAR
VAR
VAR
VAR
Byte
Byte
Byte
Word
' Analog to Digital Converter data
' Offset voltage read from StampPlot
' Span voltage read from StampPlot
' Calculated temp in hundredths of degree F
' ADC Chip Select pin
' ADC Clock pin
' ADC Data output
' Pin for PWM to set ADC voltage span
' Pin for PWM to set ADC Offset
' Allow connection stabilization

Related parts for 130-28176