Hi,
I have K60 Tower board: MK60FN1M0VLQ12.
I had one channel DMA read working:
Data result is in the register: ADC0_RA
ADC0_SC1(0)= 0x10; | // select channel 0x10 | |||||
If I add another channel:
ADC0_SC1(0)= 0x10; // select channel 0x10
ADC0_SC1(1)= 0x16; // select channel 0x16
where is the data results: for the channel 0x16 as above added second channel
is still in ADC0_RA register or in ADC0_RB ?
Thank you,
David Zhou
解決済! 解決策の投稿を見る。
Hi David
The ADC0 Status and Control Registers 1 (ADC0_SC1n) has two registers: ADC0_SC1A and ADC0_SC1B.
The ADC0_SC1A supports both software and hardware trigger; while the ADC0_SC1B only supports the hardware trigger.
Please check your below code is written value to ADC0_SC1A or ADC0_SC1B register.
ADC0_SC1(1) = 0X16;
If write value to ADC0_SC1A, the ADC result located at ADC0_RA register;
While if write value to ADC0_SC1B, after hardware trigger, the ADC conversion value located at ADC0_RB register.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi David
The ADC0 Status and Control Registers 1 (ADC0_SC1n) has two registers: ADC0_SC1A and ADC0_SC1B.
The ADC0_SC1A supports both software and hardware trigger; while the ADC0_SC1B only supports the hardware trigger.
Please check your below code is written value to ADC0_SC1A or ADC0_SC1B register.
ADC0_SC1(1) = 0X16;
If write value to ADC0_SC1A, the ADC result located at ADC0_RA register;
While if write value to ADC0_SC1B, after hardware trigger, the ADC conversion value located at ADC0_RB register.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you, Hui Ma.
David Zhou