Class DS1620
- java.lang.Object
-
- org.deepjava.runtime.mpc555.driver.DS1620
-
public class DS1620 extends Object
Driver for the temperature sensor DS1620 connected to pins of the MPIOSM.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) MPIOSM_DIO
clk
(package private) MPIOSM_DIO
dq
(package private) MPIOSM_DIO
rst
-
Constructor Summary
Constructors Constructor Description DS1620(byte reset, byte clock, byte data)
Creates new sensor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
outPattern(byte pat)
short
read()
Reads temperature, returns value in deg.byte
readConfig()
Returns configuration datavoid
startConvert()
start conversions, must be called once upon power-upvoid
writeConfig()
Configures the sensor for serial connection must be called only once, not for each power-cycle.
-
-
-
Field Detail
-
rst
MPIOSM_DIO rst
-
clk
MPIOSM_DIO clk
-
dq
MPIOSM_DIO dq
-
-
Method Detail
-
outPattern
void outPattern(byte pat)
-
startConvert
public void startConvert()
start conversions, must be called once upon power-up
-
read
public short read()
Reads temperature, returns value in deg. centigrade times 2.- Returns:
- Temperature in degrees centigrade times 2.
-
writeConfig
public void writeConfig()
Configures the sensor for serial connection must be called only once, not for each power-cycle.
-
readConfig
public byte readConfig()
Returns configuration data- Returns:
- Configuration word.
-
-