Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Arduino due Sam3X8E With Atmel Studio 6.1(SamICE Debugger)

Status
Not open for further replies.

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.....
:?
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

  • Adc_Seq_15channel.zip
    4.4 KB · Views: 49
Last edited by a moderator:

i try to make you clear what i am trying for !!
i have CCD sensor Which has a output pattern (Refer pic1).The output of ccd is analog and the rate of 1msps.
I am connected the analog output to the SAM3X8E (Arduino Due). Adc configured as Ext trigger (Rising Edge) given 1mhz clock(same camera clock which ccd Triggered). Start and stop connected to port pin edge trigger . whenever 1 interrupt (start adc, Read ccd data) stop when 2 interrupt.(Refer : SI the clock mentioned in pic1).

Between start and stop there are 128 clocks (ccd will out 120 pixel analog output).. i need to read this 128 pixel in adc and load the data to 1d Array... please help how to make this logic ..

The above code is the example code . i will upload the real code that made for the mentioned logic..
expected is 128 data in buffer .

please let me know some more details required.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top