The Complete ADC conversion Library Course In PIC

$199.99

Description

ADC LibraryADC (Analog to Digital Converter) module is available with a number of PIC MCU modules. ADC is an electronic circuit that converts continuous signals to discrete digital numbers. ADC Library provides you a comfortable work with the module.Library RoutinesADC_InitADC_Get_SampleADC_ReadADC_InitThis routine initializes PICs internal ADC module to work with RC clock. Clock determines the time period necessary for performing AD conversion (min 12TAD).Requires MCU with built-in ADC module.Example:ADC_Init(); // Initialize ADC module with default settingsADC_Get_Sampleunsigned ADC_Get_Sample(unsigned short channel);Returns 10 or 12-bit unsigned value read from the specified channel (MCU dependent).Description The function aquires analog value from the specified channel.Parameter channel represents the channel from which the analog value is to be acquired. Refer to the appropriate datasheet for channel-to-pin mapping.Parameterschannel represents the channel from which the analog value is to be acquired.RequiresThe MCU with built-in ADC module. Prior to using this routine, ADC module needs to be initialized. See ADC_Init. Before using the function, be sure to configure the appropriate TRISx bits to designate pins as inputs. Exampleunsigned adc_value;adc_value = ADC_Get_Sample(2); // read analog value from ADC module channel 2ADC_ReadPrototypeunsigned ADC_Read(unsigned short channel);Returns 10 or 12-bit unsigned value read from the specified channel (MCU dependent).Description Initializes PICs internal ADC module to work with RC clock. Clock determines the time period necessary for performing AD conversion (min 12TAD).Parameter channel represents the channel from which the analog value is to be acquired. Refer to the appropriate datasheet for channel-to-pin mapping.RequiresNothing.Exampleunsigned tmp; tmp = ADC_Read(2); // Read analog value from channel 2