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

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
' -----[ Title ]-----------------------------------------------------------
' Process Control - PwmFiltering.bs2
' Control of PWM filtering circuits through StampPlot
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
ADC_DataIn
PWM_Val
SampleAmount VAR Word
SampleCount
Fan
ADC_CS
ADC_Clk
ADC_Dout
' -----[ Initialize ] -----------------------------------------------------
PAUSE 1000
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
READ_SP:
RETURN
DrivePWM:
RETURN
Read_ADC:
RETURN
GOSUB Read_SP
GOSUB DrivePWM
FOR SampleCount = 1 TO SampleAmount
NEXT
DEBUG "!READ (sldPWM)",CR
DEBUGIN DEC PWM_Val
PAUSE 100
DEBUG "!READ (sldSample)",CR
DEBUGIN DEC SampleAmount
PAUSE 100
DEBUG "^TEXT (PTIME),105A,0.8A,(BLACK),PWM\n",DEC PWM_Val,CR
PWM Fan, PWM_Val, 255
LOW ADC_CS
SHIFTIN ADC_Dout,ADC_Clk, MSBPOST,[ADC_DataIn\9] ' Clock in data from ADC
HIGH ADC_CS
GOSUB Read_ADC
GOSUB PlotData
PIN 2
PIN 13
PIN 14
PIN 15
VAR Byte
VAR Byte
VAR Word
' Analog to Digital Converter data
' Amount of PWM to apply as read from StampPlot
' Amount of time to apply as read from StampPlot
' Count of applied PWM
' PWM Drive pin - For fan eventually
' ADC Chip Select pin
' ADC Clock pin
' ADC Data output
' Connection stabilization
' Read setting from StampPlot
' Drive output
' Plot data
' Request PWM slider val. from StampPlot
' Accept value and store
' Request number for sample from StampPlot
' Accept value and store
' Drive PWM
' Read ADC 0831
' Enable chip
' Disable ADC
' Read ADC for number of samples
' Label plot

Related parts for 130-28176