We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to read value from AD converter in specific time, in my timer1 interrupt routine, is that possible?
Which MCU it is?
For LPC2378, see the AD0CR and AD0GDR registers in the user manual.
I think it should work this way:
Setup your timer.
Clear the BURST bit, so that you can manually do the AD conversion.
Set the START bits 001 to start the conversion now.
Then in every timer interrupt, check the DONE bit AD0GDR to see if the conversion has been done.. If DONE, read the value in and then restart the conversion
Or you can also check individual done flags in AD0STAT.
I have not worked on LPC23xx so this is a guess. Hope it helps...