Forum: FPGA, VHDL & Co. DS18B20 Programm


von Dirk (Gast)


Angehängte Dateien:

Lesenswert?

Hallo Leute,

ich habe vor, einen DS18B20 an einen Mega32 zu hängen. Lt. Datenblatt
kann der 0,5°C genau. Jetzt habe ich ein Programm gefunden, das 0,1°C
kann.

Kann mir einer das ein wenig erklären?
Dann gibt es noch eine Aussage in Datenblatt.

"The core functionality of the DS18B20 is its direct-to-digital
temperature sensor. The resolution of the
temperature sensor is user-configurable to 9, 10, 11, or 12 bits,
corresponding to increments of 0.5C,
0.25C, 0.125C, and 0.0625C, respectively. The default resolution at
power-up is 12-bit. The DS18B20
powers-up in a low-power idle state; to initiate a temperature
measurement and A-to-D conversion, the
master must issue a Convert T [44h] command. "
...
"The DS18B20 output temperature data is calibrated in degrees
centigrade; for Fahrenheit applications, a
lookup table or conversion routine must be used. The temperature data
is stored as a 16-bit sign-extended
two’s complement number in the temperature register (see Figure 2). The
sign bits (S) indicate if the
temperature is positive or negative: for positive numbers S = 0 and for
negative numbers S = 1. If the
DS18B20 is configured for 12-bit resolution, all bits in the
temperature register will contain valid data.
For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits
1 and 0 are undefined, and for 9-bit
resolution bits 2, 1 and 0 are undefined. Table 2 gives examples of
digital output data and the
corresponding temperature reading for 12-bit resolution conversions.
"
Gruss

Dirk

von 123 (Gast)


Lesenswert?

tut mir leid du bis im falschen forum.

von Dirk (Gast)


Lesenswert?

Tread oder "Forum". Hier gibt es also nur C? Hier macht niemand in
Bascom?
In C den 1Wire auszulesen ist schwerer, oder bilde ich mir das ein?

von Dirk (Gast)


Lesenswert?

Hi,

hier geht es nicht um C sondern zu 90 % um VHDL bzw Programmierbare
Logik.

Gruß,
Dirk

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.