750-00004 Parallax Inc, 750-00004 Datasheet - Page 25

no-image

750-00004

Manufacturer Part Number
750-00004
Description
POWER SUPPLY 24VDC 600MA
Manufacturer
Parallax Inc
Datasheet

Specifications of 750-00004

Form
Wall Mount (2 Prong)
Voltage - Output Per Connector
24VDC
Current - Output
600mA
Polarization
Positive Center
Cord Plug
2.1mm I.D. x 5.5mm O.D. x 12mm Female
Voltage - Input
120VAC
Power - Output
14W
Transformer Type
Linear, Unregulated
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Efficiency
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
The subroutine "Control_Pumps" decides which pump to start based on how much run-time is on each
pump. The idea here is to even the wear.
Control_Pumps:
GetDigitalInputs:
Read_Tank_Level:
'
The other two subroutines on this section of code are straight forward, but for the trick we play with the
"tankLevel" variable. The A/D converter is a 12-bit device. Our example program is only concerned with
the upper 8 bits of data, so we shift the data four positions to the right. This is a fast way to divide by 16
within a binary digital system. If you wanted more precision for you’re application simply forego this step,
but beware that you need to ensure the memory you use must accommodate the extra bits.
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
SELECT tankLevel
ENDSELECT
RETURN
LOW load
PAUSE 1
HIGH load
PAUSE 1
SHIFTIN SrDin,SrClk, LSBPRE, [tmp]
RETURN
LOW AdcCs
PAUSE 1
SHIFTOUT AdcDout, AdcClk, MSBFIRST, [240]
HIGH AdcCs
PAUSE 1
LOW AdcCs
PAUSE 1
SHIFTIN AdcDin, AdcClk, MSBPRE, [tankLevel\12]
PAUSE 1
HIGH AdcCs
tankLevel = tankLevel>>4
RETURN
DEBUG "Tank Level:", DEC3 tankLevel, " inches
CASE < setPoint2
CASE < setPoint1
CASE ELSE
startCode = 3
GOSUB StartA
GOSUB StartB
IF (pumpAStatus <> 1 AND pumpBStatus <>1) THEN
ENDIF
GOSUB Stop_Pumps
IF RunTimeA < RunTimeB THEN
ELSE
ENDIF
startCode = 1
GOSUB StartA
startCode = 2
GOSUB StartB
'Tank Level
'Reads tank level
'Divide it by 8
"
Page
25

Related parts for 750-00004