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

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
Example Program: IncubatorManual.bs2
' -----[ Title ]-----------------------------------------------------------
' Process Control - IncubatorManual.bs2
' Allows manual control of incubator heater and fan via StampPlot
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
ADC_ByteValue
V_Offset
V_Span
TempF
ADC_CS
ADC_Clk
ADC_Dout
ADC_VRef
ADC_Vminus
Heater
Fan
' -----[ Initialization ]--------------------------------------------------
LOW Heater
LOW Fan
PAUSE 1000
GOSUB ReadSP_Temps
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
ReadSP_Temps:
RETURN
GOSUB ReadSP_Controls
GOSUB SetADC
GOSUB ReadData
GOSUB CalcTemp
GOSUB PlotTemp
PAUSE 500
DEBUG CR,"!READ (txtTMin)",CR
DEBUGIN DEC V_Offset
PAUSE 50
DEBUG "!READ [(txtTMax),-,(txtTMin)]",CR ' obtain temperature span
DEBUGIN DEC V_Span
PAUSE 50
Enter, save and run the BASIC Stamp program IncubatorManual.bs2.
PIN 13
PIN 14
PIN 15
PIN 10
PIN 11
PIN 5
PIN 0
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
' Pin for heater control
' Pin for Fan control
' Heater off
' Fan off
' Connection stabilization
' Get temp span and offset from StampPlot
' obtain min temperature (offset)

Related parts for 130-28176