Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otAD8318 Class Reference
[AD8318 - Logarithmic Detector/Controller, 1 MHz to 8 GHz, 70 dB, AD8318 - Logarithmic Detector/Controller, 1 MHz to 8 GHz, 70 dB]

Class logarithmic Detector/Controller.

#include <otAD8318.h>


Public Member Functions

 otAD8318 ()
void init (float adc, U32 histCount=32)
void close ()
void setFrequencyIndex (U8 f)
U8 frequencyIndex ()
void setAttenuationIndex (U8 a)
U8 attenuationIndex ()
void setUserAttenuation (float a)
float userAttenuation ()
float currentAttenuation ()
float currentFrequency ()
float actualPower ()
float peakEnvelope ()
float dBmToMilliWatt (float dBm)
float mWtoDbm (float mw)
float dBmToVolt (float dBm)
float voltToDbm (float voltage)
float valueTodBm (int value)
S32 evaluate (S32 min_value, S32 max_value, F32 average)


Constructor & Destructor Documentation

otAD8318.otAD8318 (   ) 
 

Create the class


Member Function Documentation

float otAD8318.actualPower (   ) 
 

Return the value of measured power as dBm

Returns:
Power as dBm

U8 otAD8318.attenuationIndex (   ) 
 

Read used attenuation index

Returns:
Attenuation index

void otAD8318.close (   ) 
 

Close the library and free all allocated memory

float otAD8318.currentAttenuation (   ) 
 

Get the current selected attenuation.

Returns:
Attenuation as dBm

float otAD8318.currentFrequency (   ) 
 

Get used frequency as MHz

Returns:
Frequency as MHz

float otAD8318.dBmToMilliWatt (  float  dBm  ) 
 

Convert a value from dBM to mW
dBm (sometimes dBmW or decibel-milliwatts) is unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW).

Parameters:
dBm Value to convert
Returns:
mW value

float otAD8318.dBmToVolt (  float  dBm  ) 
 

Convert a value from dBm to Volt

Parameters:
dBm Value to convert
Returns:
Volt value

S32 otAD8318.evaluate (  S32  min_value,
S32  max_value,
F32  average
) 
 

Perform the signal evaluation starting from minimum, maximum and average.

Parameters:
min_value Minimum value of sampled data
max_value Maximum value of sampled data
average Average value of sampled data
Returns:
Modulation index based on history

U8 otAD8318.frequencyIndex (   ) 
 

Return set frequency selction

Returns:
Frequency index

void otAD8318.init (  float  adc,
U32  histCount = 32
) 
 

Init the class

Parameters:
adc AD converter constant to convert a raw value in volt
histCount History buffer size

float otAD8318.mWtoDbm (  float  mw  ) 
 

Convert a value from mW to dBm

Parameters:
mw Value to convert
Returns:
dBm value

float otAD8318.peakEnvelope (   ) 
 

Return measured current peak envelope power in dBm

Returns:
PEP as dBm

void otAD8318.setAttenuationIndex (  U8  a  ) 
 

Set attenuation index from known values:
0 = User
1 = VAT-20W2+ attenuation at selected frequency 2 = VAT-30W2+ attenuation at selected frequency

void otAD8318.setFrequencyIndex (  U8  f  ) 
 

Frequency selection from known values:
0 = 900MHz
1 = 1800MHz
2 = 2200MHz
3 = 3600MHz
4 = 5800MHz
5 = 8000MHz

Parameters:
f Frequency index selection 0 to 5

void otAD8318.setUserAttenuation (  float  a  ) 
 

Set a user attenuation as dBm. Used when no attenuator profile is selected.

Parameters:
a Attenuation value.

float otAD8318.userAttenuation (   ) 
 

Read user attenuation

Returns:
Used attenuation as dBm

float otAD8318.valueTodBm (  int  value  ) 
 

Convert a raw value (from ADC) to dBm

Parameters:
value Raw value to convert
Returns:
dBm value

float otAD8318.voltToDbm (  float  voltage  ) 
 

Convert a value from Volt to dBm

Parameters:
voltage Value to convert
Returns:
dBm value


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0