zsolt1
Full Member level 6
- Joined
- Aug 11, 2012
- Messages
- 367
- Helped
- 50
- Reputation
- 100
- Reaction score
- 49
- Trophy points
- 1,308
- Location
- Cluj-Napoca, Romania
- Activity points
- 3,880
hi,
I am facing a problem with the ADC module of dsPIC33FJ32MC205 chip. The problem is that i can't get the voltage from any ANx pin . Am I doing something vrong i the code ?
...
OpenADC1(
ADC_MODULE_ON & ADC_IDLE_STOP & ADC_ADDMABM_ORDER &
ADC_AD12B_10BIT & ADC_FORMAT_SIGN_FRACT & ADC_CLK_AUTO &
ADC_AUTO_SAMPLING_OFF & ADC_MULTIPLE & ADC_SAMP_ON,
ADC_VREF_AVDD_AVSS & ADC_SCAN_OFF & ADC_SELECT_CHAN_0 &
ADC_DMA_ADD_INC_1 & ADC_ALT_BUF_OFF & ADC_ALT_INPUT_OFF ,
ADC_CONV_CLK_SYSTEM & ADC_SAMPLE_TIME_14 & ADC_CONV_CLK_14Tcy,
0,
ENABLE_AN3_ANA,
0,
0,
0
);
while(BusyADC1());
Isa = ADC1BUF0*0.00322;
CloseADC1();
...
I use Mplab with c30 , to view the result i use Mplab's RTDM feature . AN3 pin is input -TRISB1 is set- and i have 1.6 V on it, from opamp ...
I am facing a problem with the ADC module of dsPIC33FJ32MC205 chip. The problem is that i can't get the voltage from any ANx pin . Am I doing something vrong i the code ?
...
OpenADC1(
ADC_MODULE_ON & ADC_IDLE_STOP & ADC_ADDMABM_ORDER &
ADC_AD12B_10BIT & ADC_FORMAT_SIGN_FRACT & ADC_CLK_AUTO &
ADC_AUTO_SAMPLING_OFF & ADC_MULTIPLE & ADC_SAMP_ON,
ADC_VREF_AVDD_AVSS & ADC_SCAN_OFF & ADC_SELECT_CHAN_0 &
ADC_DMA_ADD_INC_1 & ADC_ALT_BUF_OFF & ADC_ALT_INPUT_OFF ,
ADC_CONV_CLK_SYSTEM & ADC_SAMPLE_TIME_14 & ADC_CONV_CLK_14Tcy,
0,
ENABLE_AN3_ANA,
0,
0,
0
);
while(BusyADC1());
Isa = ADC1BUF0*0.00322;
CloseADC1();
...
I use Mplab with c30 , to view the result i use Mplab's RTDM feature . AN3 pin is input -TRISB1 is set- and i have 1.6 V on it, from opamp ...