Mikroelektronika MIKROE-724 データシート
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
243
Library Routines
- ADCx_Init
- ADCx_Init_Advanced
- ADCx_Get_Sample
- ADCx_Read
- ADC_Set_Active
ADCx_Init
Prototype
sub procedure ADCx_Init()
Description This routines configures 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
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.