A N 3 7 0
42
Rev. 1.0
7.3. Demodulator Temperature Sensor Module
This module is responsible for all interactions with the demodulator and temperature sensor.
The Demodulator Interrupt Service Routine (DMD ISR) is required to be a part of the user application. In the
application, once the demodulator and temperature sensor have been configured, the DMD ISR triggers each time
a new sample is ready.
7.3.1. Demodulator Temperature Sensor Module Functions
iDmdTs_GetLatestDmdSample
Description
: Returns the latest demodulator reading as recorded by vDmdTs_IsrCall(). It
also clears the count of taken samples (sample count) from temperature sensor which is
used by application code to determine if a new sample is ready. The sample count can be
acquired via the function bDmdTs_GetSamplesTaken().
Upon entry the function records the current value of the EA global interrupt enable bit,
disable all interrupts by setting
EA = 0;
Then it does its own processing, and just before return it puts the EA back to the state the
function was entered with. The global interrupt disable is very brief (few instructions).
Inputs
:
None
Outputs
:
Demodulator Output: (int) Signed output of the demodulator.
iDmdTs_GetLatestTemp
Description
: Returns the latest temperature demodulator reading converted to tempera-
ture. The demodulator reading is the latest reading as recorded by vDmdTs_IsrCall(). This
function calls iDmdTs_GetLatestDmdSample(), so it also clears the count of taken sam-
ples (see above).
Inputs
:
None