⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setchanadc10.c

📁 Mplab C30编译器
💻 C
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "adc.h"

#if defined (_ADC_1012_V1) || defined (_ADC_1012_V2_GB)
/*********************************************************************
Function Prototype : void SetChanADC10(unsigned int channel0) 

Include            : adc.h 

Description        : This function sets the positive and negative inputs for 
                     the sample multiplexers A and B. 

Arguments          : channel0 - This contains the input select parameter to be 
                     configured into the ADCHS register as defined below
                     Channel 0 Negative Input Select for MUX B Multiplexer
                       ADC_CH0_NEG_SAMPLEB_AN1
                       ADC_CH0_NEG_SAMPLEB_NREFN
                     Channel 0 Negative Input Select for MUX A Multiplexer
                       ADC_CH0_NEG_SAMPLEA_AN1
                       ADC_CH0_NEG_SAMPLEA_NREFN
                     Channel 0 Positive Input Select for MUX B
                       ADC_CH0_POS_SAMPLEB_AN0
                       ADC_CH0_POS_SAMPLEB_AN1
                       .....
                       ADC_CH0_POS_SAMPLEB_AN15
                       //This feature is available only on GB family devices
                       ADC_CH0_POS_SAMPLEB_VBG
                       ADC_CH0_POS_SAMPLEB_VBGDIV2                       
                     Channel 0 Positive Input Select for MUX A
                       ADC_CH0_POS_SAMPLEA_AN0
                       ADC_CH0_POS_SAMPLEA_AN1
                       .....
                       ADC_CH0_POS_SAMPLEA_AN15
                       //This feature is available only on GB family devices
                       ADC_CH0_POS_SAMPLEA_VBG
                       ADC_CH0_POS_SAMPLEA_VBGDIV2  
                                      
Return Value       : None 

Remarks            : This function configures the inputs for sample multiplexers 
                     A and B by writing to ADCHS register.
*********************************************************************/

void SetChanADC10(unsigned int channel0)
{
    AD1CHS = channel0;
}

#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -