Alle Dateien Funktionen Variablen Makrodefinitionen Gruppen Seiten
DS18X20 FUNCTIONS

Makrodefinitionen

#define ds18B20_convert_t(x)   ds18x20_convert_t(x)
 
#define ds18S20_convert_t(x)   ds18x20_convert_t(x)
 
#define ds18B20_read_scratchpad(x)   ds18x20_read_scratchpad(x)
 
#define ds18S20_read_scratchpad(x)   ds18x20_read_scratchpad(x)
 
#define ds18B20_copy_scratchpad(x)   ds18x20_copy_scratchpad(x);
 
#define ds18S20_copy_scratchpad(x)   ds18x20_copy_scratchpad(x);
 
#define ds18B20_recall_E2(x)   ds18x20_recall_E2(x)
 
#define ds18S20_recall_E2(x)   ds18x20_recall_E2(x)
 
#define ds18B20_read_power_supply(x)   ds18x20_read_power_supply(x)
 
#define ds18S20_read_power_supply(x)   ds18x20_read_power_supply(x)
 

Funktionen

uint8_t ds18x20_convert_t (uint8_t parasitic_power)
 start temperature conversion Mehr ...
 
uint8_t ds18B20_read_temp (int16_t *temperature)
 Read temperature from DS18B20 (12 bit resolution) Mehr ...
 
uint8_t ds18S20_read_temp (int16_t *temperature)
 Read temperature from DS18S20 (9 bit + enhanced resolution, effective 12 bits) Mehr ...
 
void ds18x20_read_scratchpad (uint8_t *buffer)
 Read complete scratchpad of DS18x20 (9 bytes) Mehr ...
 
void ds18S20_write_scratchpad (int8_t th, int8_t tl)
 write th and tl of DS18S20 Mehr ...
 
void ds18B20_write_scratchpad (int8_t th, int8_t tl, uint8_t config)
 write th, tl and configuration of DS18B20 Mehr ...
 
void ds18x20_copy_scratchpad (uint8_t parasitic_power)
 copy scratchpad to EEPROM, busy waiting (10ms), Mehr ...
 
void ds18x20_recall_E2 (void)
 copy EEPROM to scratchpad, busy waiting (1ms) Mehr ...
 
uint8_t ds18x20_read_power_supply (void)
 read power supply Mehr ...
 

Ausführliche Beschreibung

standard functions

Makro-Dokumentation

#define ds18B20_convert_t (   x)    ds18x20_convert_t(x)
#define ds18B20_copy_scratchpad (   x)    ds18x20_copy_scratchpad(x);
#define ds18B20_read_power_supply (   x)    ds18x20_read_power_supply(x)
#define ds18B20_read_scratchpad (   x)    ds18x20_read_scratchpad(x)
#define ds18B20_recall_E2 (   x)    ds18x20_recall_E2(x)
#define ds18S20_convert_t (   x)    ds18x20_convert_t(x)
#define ds18S20_copy_scratchpad (   x)    ds18x20_copy_scratchpad(x);
#define ds18S20_read_power_supply (   x)    ds18x20_read_power_supply(x)
#define ds18S20_read_scratchpad (   x)    ds18x20_read_scratchpad(x)
#define ds18S20_recall_E2 (   x)    ds18x20_recall_E2(x)

Dokumentation der Funktionen

uint8_t ds18B20_read_temp ( int16_t *  temperature)

Read temperature from DS18B20 (12 bit resolution)

Parameter
*temperaturepointer to temperature variable in 1/10 C (fixed point)
Rückgabe
error code
ONEWIRE_OK no error
ONEWIRE_CRC_ERROR CRC error when reading temperature

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void ds18B20_write_scratchpad ( int8_t  th,
int8_t  tl,
uint8_t  config 
)

write th, tl and configuration of DS18B20

Parameter
thupper temperature limit (1 C resolution)
tllower temperature limit (1 C resolution)
configconfiguration byte
Rückgabe
none

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

uint8_t ds18S20_read_temp ( int16_t *  temperature)

Read temperature from DS18S20 (9 bit + enhanced resolution, effective 12 bits)

Parameter
*temperaturepointer to temperature variable in 1/10 C (fixed point)
Rückgabe
error code
ONEWIRE_OK no error
ONEWIRE_CRC_ERROR CRC error when reading temperature

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void ds18S20_write_scratchpad ( int8_t  th,
int8_t  tl 
)

write th and tl of DS18S20

Parameter
thupper temperature limit (1 C resolution)
tllower temperature limit (1 C resolution)
Rückgabe
none

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

uint8_t ds18x20_convert_t ( uint8_t  parasitic_power)

start temperature conversion

Parameter
parasitic_powerset true if device has parasitic power supply
Rückgabe
error code
0: no error
1: no presence pulse detected

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void ds18x20_copy_scratchpad ( uint8_t  parasitic_power)

copy scratchpad to EEPROM, busy waiting (10ms),

parasitic power switching is completely handled inside the function, no need for further user action

Parameter
parasitic_powerset true if device has parasitic power supply
Rückgabe
none

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

uint8_t ds18x20_read_power_supply ( void  )

read power supply

Parameter
none
Rückgabe
power mode
0: normal power
1: parasitic power

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

void ds18x20_read_scratchpad ( uint8_t *  buffer)

Read complete scratchpad of DS18x20 (9 bytes)

Parameter
*bufferpointer to data array
Rückgabe
none

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void ds18x20_recall_E2 ( void  )

copy EEPROM to scratchpad, busy waiting (1ms)

Parameter
none
Rückgabe
none

Hier ist ein Graph, der zeigt, was diese Funktion aufruft: