examples/benchmark/kernel-core_avr/hw/hw_ntc.h File Reference
NTC hardware-specific definition. More...
#include "ntc_map.h"
#include <cfg/debug.h>
#include <drv/ntc.h>
#include <drv/adc.h>
Go to the source code of this file.
Functions | |
| res_t | ntc_hw_read (NtcDev dev) |
| const NtcHwInfo * | ntc_hw_getInfo (NtcDev dev) |
Detailed Description
NTC hardware-specific definition.
- Version:
- Id
- hw_ntc.h 2927 2009-09-10 13:06:04Z lottaviano
o Vref
|
| o Vref
| |
----- |
| | ---------
| Rser| | |
| | | |
----- ----- | ADC |
| Vp | | | |
-----------|------| Amp |-------------| |
| | | | Vadc | |
----- ----- ----- ---------
| | | |
| NTC | | Rpar|
| | | |
----- -----
| |
| |
----- -----
--- ---
* Amp is an amplifier that amplify of AMP times the signal. If we indicate Rp as the parallel of NTC with Rpar, ADCBITS as the bits of the ad converter and ADCVAL as the result from the adc convertion (Not Vadc but just the value read from the adc register), after various calculation, the expression of Rp is:
ADCVAL * Rser
Rp = ------------------------
ADCBITS
2 * AMP - ADCVAL
*And after that NTC obvisiously is:
Rpar * Rp
NTC = ----------
Rpar - Rp
*The function ntc_hw_read() compute the resistence using these formulas above.
Definition in file examples/benchmark/kernel-core_avr/hw/hw_ntc.h.
Function Documentation
| const NtcHwInfo* ntc_hw_getInfo | ( | NtcDev | dev | ) | [inline] |
Return the info (aka the table) associated with ntc device dev.
Definition at line 129 of file examples/benchmark/kernel-core_avr/hw/hw_ntc.h.
| res_t ntc_hw_read | ( | NtcDev | dev | ) | [inline] |
Read the resistence of ntc device dev. Return the result in res_t type.
Definition at line 113 of file examples/benchmark/kernel-core_avr/hw/hw_ntc.h.
