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.

simultaneous sampling using two separate ADC units

Status
Not open for further replies.

saochandan

Junior Member level 1
Joined
Mar 13, 2012
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,409
Hi all

I am using Fujitsu FM3 MB9BF506R microcontroller which consists cortexM3 processor and 3 ADC units.
I am trying to make use of 2 ADCs out of three. I am reading the conversion result from both ADCs one by one.

I want to get the sampling result simultaneously.
How I can be assure that sampling of inputs occurring simultaneously or one after another?


Here is my dual timer interrupt handler function:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void DT_QDU_IRQHandler(void)
{
 
/* To check both ADCs are running */
 
if((1 != (IOREG_ADSR_U0 &0x1)) || (1 != (IOREG_ADSR_U1 &0x1)))  
{
 
/* reading 1st channel*/
AD_Data_temp = IOREG_SCFD_U0;         // To gets the contents(input data) of SCFD registers
AD_Data_temp = AD_Data_temp >> 20;   //  To get 12 MSBs which holds 12 bit conversion result
 
/* reading 2nd channel*/
AD_Data_temp1 = IOREG_SCFD_U1;         // To gets the contents(input data) of SCFD registers
AD_Data_temp1 = AD_Data_temp1 >> 20;   //  To get 12 MSBs which holds 12 bit conversion result
 
}
 
    IOREG_SCCR_U0 |= 0x01;         // To restart ADC0 conversion
    IOREG_SCCR_U1 |= 0x01;         // To restart ADC1 conversion
 
}
Timer1IntClr = 1;
}




Is above code is correct way of reading simultaneous ADC values. If not, then please give me some solution so that I can get simultaneous sampling.



Thank you
 
Last edited by a moderator:

where is your ADC initialisation .. the ADC clock rate will determine sampling frequency
if both ADC's use same clock rate .. u can achieve simultaneous sampling
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top