This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
各位前辈,
指南上说的type3,我看的SOC不是很明白,示例中给的ADC.c中有这么一段程序,
void InitAdcAio()
{
EALLOW;
/* Configure ADC pins using AIO regs*/
// This specifies which of the possible AIO pins will be Analog input pins.
// NOTE: AIO1,3,5,7-9,11,13,15 are analog inputs in all AIOMUX1 configurations.
// Comment out other unwanted lines.
GpioCtrlRegs.AIOMUX1.bit.AIO2 = 2; // Configure AIO2 for A2 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO4 = 2; // Configure AIO4 for A4 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO6 = 2; // Configure AIO6 for A6 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO10 = 2; // Configure AIO10 for B2 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO12 = 2; // Configure AIO12 for B4 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO14 = 2; // Configure AIO14 for B6 (analog input) operation
EDIS;
}
其作用是什么呢?
另外,
void AdcChanSelect(Uint16 ch_no)
{
AdcRegs.ADCSOC0CTL.bit.CHSEL= ch_no;
AdcRegs.ADCSOC1CTL.bit.CHSEL= ch_no;
..........
AdcRegs.ADCSOC14CTL.bit.CHSEL= ch_no;
AdcRegs.ADCSOC15CTL.bit.CHSEL= ch_no;
}
这个ch_no是指什么?
请问有没有28035的ADC.c的配置例程?看参考指南还是不太明白该做那些配置,比如使用ADCINA0/ADCINA1/ADCINA2分别采样直流母线电压,直流母线电流,相电流IV,这三个配置的时候那些地方需要着重注意呢?
我的问题是note里说AI01,3...等也是AIOMUX1配置,这个意思是这些IO口只能作为输入配置吗?