EDF - OnePIC MCU  v1.1.0
Potentiometer
Collaboration diagram for Potentiometer:

Defines

#define FILTER_MEDIAN_LENGTH   3
#define FILTER_MIDDLE_VALUE   (FILTER_MEDIAN_LENGTH-1)/2

Functions

void EDF_potInit (void)
 no init needed for 32
uint16_t filterMedian (uint16_t d)
 experiencing some dropped readings, so the median filter takes three samples and passes the median of the three
uint16_t EDF_potRead (void)
 takes the reading

Function Documentation

void EDF_potInit ( void  )

no init needed for 32

Initilizes the POT to take a reading.

Definition at line 44 of file OnePIC_32bit_pot.c.

Here is the call graph for this function:

uint16_t EDF_potRead ( void  )

takes the reading

Returns:
the 16bit digital representation of the analog voltage

Definition at line 73 of file OnePIC_32bit_pot.c.

Here is the call graph for this function:

uint16_t filterMedian ( uint16_t  d)

experiencing some dropped readings, so the median filter takes three samples and passes the median of the three

Parameters:
dadc value
Returns:
16bit average of the ADC

Definition at line 53 of file OnePIC_32bit_pot.c.