Class DS1620


  • public class DS1620
    extends Object
    Driver for the temperature sensor DS1620 connected to pins of the MPIOSM.
    • Constructor Summary

      Constructors 
      Constructor Description
      DS1620​(byte reset, byte clock, byte data)
      Creates new sensor
    • Constructor Detail

      • DS1620

        public DS1620​(byte reset,
                      byte clock,
                      byte data)
        Creates new sensor
        Parameters:
        reset - pin number (MPIOSM) for rst signal
        clock - pin number (MPIOSM) for clk signal
        data - pin number (MPIOSM) for dq signal
    • 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.