Hello,
I am working with TWR-K20D72M board as controller and IAREW(IAR Embedded Workbench) software for programming.i download the sample codes from the below link
In these sample codes they give example of Potentiometer(which is given on board) and Potentiometer is interfaced with controller's ADC1.this code works correctly.i want to run ADC0.i make and configure ADC0 code as per the sample code given in the above downloaded examples.please try to solve my below query
-- in ADC0 code isr for ADC0(interrupt for ADC0) is not generated
-- see my ADC0 configuration functions sim_init() ,pdb_init() , adc_init(), int_init() is there any mistake in those functions?
i attached my code for your reference.please help me so that i can generate interrupt for ADC0.
Thank You
Bhavin
Original Attachment has been moved to: ADC0.zip
Hi Bhavin,
After had a look through the code you uploaded, I found that you use the PDB channel1 to trigger the ADC, however each channel is associated with one ADC block, in anohter word, the PDB channel0 is associated the ADC0, then channel1 to ADC1.
I think it's the root cause of the issue.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi jeremyzhou,
Thank you for your reply now ADC0 works properly.