User manual

270
mikoC PRO for dsPIC
MikroElektronika
Library Routines
- ADCx_Init
- ADCx_Init_Advanced
- ADCx_Get_Sample
- ADCx_Read
- ADC_Set_Active
ADCx_Init
Prototype
void ADCx_Init();
Description This routines conî‚¿gures ADC module to work with default settings.
The internal ADC module is set to:
- single channel conversion
- 10-bit conversion resolution
- unsigned integer data format
- auto-convert
- VRef+ : AVdd, VRef- : AVss
- instruction cycle clock
- conversion clock : 32*Tcy
- auto-sample time : 31TAD
Parameters None.
Returns Nothing.
Requires - MCU with built-in ADC module.
- ADC library routines require you to specify the module you want to use. To select the
desired ADC module, simply change the letter x in the routine prototype for a number
from 1 to 2.
Example
ADC1_Init(); // Initialize ADC1 module with default settings
Notes - Number of ADC modules per MCU differs from chip to chip. Please, read the appropriate
datasheet before utilizing this library.