saochandan
Junior Member level 1
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:
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
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: