- 3D-Druck Einstieg und Tipps         
Ergebnis 1 bis 4 von 4

Thema: DS1621 in 0,1 Schritten auslesen

  1. #1
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    24.04.2007
    Beiträge
    114

    DS1621 in 0,1 Schritten auslesen

    Anzeige

    Powerstation Test
    Hallo zusammen,
    ich benutze mehrere DS1621 bzw. 1631 die ich über I2C Bus auslese.
    Allerdings kann ich momentan nur die vorkommerstellen ordentlich auslesen. Die nachkommer stelle kann nur 2 zustände einnehmen, 0 und 128. Würde aber gerne in 0.1°C Schritten auslesen.
    Hat das schonmal einer gemacht? Weil soweit ich weiß kann der DS1621 auf 0,0625°C messen...

    LG Hannes

  2. #2
    Erfahrener Benutzer Robotik Einstein
    Registriert seit
    22.05.2005
    Ort
    12°29´ O, 48°38´ N
    Beiträge
    2.731
    Hallo,

    der DS1621 kann nur in 0,5° Schritten messen.
    Der DS1631 kann eingestellt werden, wieviel Bit zum messen der Temperatur verwendet werden, wenn man das auf 12 Bit einstellt hat man die 0,0625°.

    Zitat Zitat von DS1631-Datenblatt S8
    The resolution of the output digital temperature data is user-configurable to 9, 10, 11, or 12 bits, corresponding to temperature increments of 0.5°C, 0.25°C, 0.125°C, and 0.0625°C, respectively. The default resolution at power-up is 12 bits, and it can be changed through the R0 and R1 bits in the configuration register. Note that the conversion time doubles for each additional bit of resolution.

  3. #3
    Benutzer Stammmitglied
    Registriert seit
    28.08.2006
    Beiträge
    48
    Hello,

    Zitat Zitat von linux_80
    Hallo,

    der DS1621 kann nur in 0,5° Schritten messen.

    This is not entirely true.
    By reading out the Counter and Slope Bytes and performing a calculation you can get temperatures in higher resolutions:


    Higher resolutions may be obtained by reading the temperature,
    and truncating the 0.5°C bit (the LSB) from the
    read value. This value is TEMP_READ. The value left in
    the counter may then be read by issuing a READ
    COUNTER command. This value is the count remaining
    (COUNT_REMAIN) after the gate period has
    ceased. By loading the value of the slope accumulator
    into the count register (using the READ SLOPE command),
    this value may then be read, yielding the number
    of counts per degree C (COUNT_PER_C) at that temperature.
    The actual temperature may be then be calculated
    by the user using the following:
    TEMPERATURE = TEMP_READ – 0.25 + (COUNT_PER_C – COUNT_REMAIN) /COUNT_PER_C
    But…. Not as high as the DS1631.

    Greetings,
    Drifter2006

  4. #4
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    24.04.2007
    Beiträge
    114
    Vielen Dank erstmal für die Antworten.

    Angenommen ich will jetzt auf 0,25° umstellen, d.h. R1=0, R0=1. Dann würde das "CONFIGURATION REGISTER" folgendermaßen aussehn: 00001100 welches dem hexwert 0xC entspricht, soweit richtig?

    Aber wie sende ich jetzt das configurations register? Einzige was mir jetzt einfällt wäre so:
    Code:
    #define accconf AC
    
    i2c_init();
    i2c_start(i2ctemp1 + I2C_WRITE);
    i2c_write(STARTCONVERT + accconf);
    i2c_stop();
    Nur wie sage ich ihm dann wie das configurations register auszusehen hat? Also 00001100 (C)


    Access Config [ ACh ]
    Reads or writes the 1-byte configuration register.

    MSb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 LSb
    DONE THF TLF NVB R1 R0 POL* 1SHOT*

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

12V Akku bauen