pravin35
Newbie level 5
- Joined
- Dec 14, 2009
- Messages
- 10
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Pune/Coimbatore
- Activity points
- 1,474
hi guys,
i am using Arduino Due with Atmel Studio .
SAM3X8E ARM cortex m3 Processor.
Atmel Studio 6.1IDE.
SAMICE Debugger.
i am trying to read Analog Signal in the internal ADC & trigger of ADC is External Which i have given 1mhz.
i am trying to read 128 Samples in for loop .but i am getting only 2 or 3 Sample Which iam printing in Serial Port.
Kindly see the code i have attached in notepad file..
below is the While loop.....
:?
i am using Arduino Due with Atmel Studio .
SAM3X8E ARM cortex m3 Processor.
Atmel Studio 6.1IDE.
SAMICE Debugger.
i am trying to read Analog Signal in the internal ADC & trigger of ADC is External Which i have given 1mhz.
i am trying to read 128 Samples in for loop .but i am getting only 2 or 3 Sample Which iam printing in Serial Port.
Kindly see the code i have attached in notepad file..
below is the While loop.....
:?
Code:
while (1) {
start_adc();
/* Check if ADC sample is done. */
for (i =0 ;i<127;i++)
{
if (g_adc_sample_data.us_done == ADC_DONE_MASK) {
for (i = 0; i < NUM_CHANNELS; i++) {
printf("CH%02d: %04d mv. ",
(int)g_adc_sample_data.uc_ch_num[i],
(int)(g_adc_sample_data.
us_value[i] ));
}
}
puts("\r");
g_adc_sample_data.us_done = 0;
}
}
}
Attachments
Last edited by a moderator: