Difference between revisions of "ADC"
(→ADC_Init) |
(→ADC_GetAdcValue) |
||
Line 25: | Line 25: | ||
{{#Widget:LibTable}} | {{#Widget:LibTable}} | ||
|- | |- | ||
− | |Defination || | + | |Defination || uint16_t ADC_GetAdcValue(uint8_t channel) |
|- | |- | ||
− | | Input Arguments || | + | | Input Arguments || uint8_t(channel number). |
|- | |- | ||
− | | Return Value|| | + | | Return Value|| uint16_t(10 bit ADC result) |
|- | |- | ||
− | | Description || | + | | Description || This function does the ADC conversion for the Selected Channel |
+ | and returns the converted 10bit result | ||
+ | The adc value per bit depends on the resolution of the ADC. | ||
+ | For AVR/PIC(10-bit adc) the adc value per lsb will be 5/1023=0048v | ||
|- | |- | ||
| Usage || | | Usage || | ||
|} | |} | ||
− | |||
− | |||
− | |||
==User guide== | ==User guide== |
Revision as of 10:31, 14 December 2014
ADC
This library provides the functions for initializing the adc and to get the raw adc values. In case of AVR/PIC/ARM or other high end controllers the inbuilt adc is used. In case of 8051/8052 as it doesn't have an inbuilt adc, ADC0809(8-bit) adc is used.
ADC_Init
Defination | void ADC_Init() |
Input Arguments | none |
Return Value | none |
Description | This function initializes the ADC module. |
Usage |
ADC_GetAdcValue
Defination | uint16_t ADC_GetAdcValue(uint8_t channel) |
Input Arguments | uint8_t(channel number). |
Return Value | uint16_t(10 bit ADC result) |
Description | This function does the ADC conversion for the Selected Channel
and returns the converted 10bit result The adc value per bit depends on the resolution of the ADC. For AVR/PIC(10-bit adc) the adc value per lsb will be 5/1023=0048v |
Usage |