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.
Hi all,
I have a grasp of setting up the ADC on the LPC2119 (by Phillps NXP). However, when it comes to reading the different channels I seem to be a little lost.
Please could someone explain how you can request the data from a specific channel of the ADC? As reading the ADDR is self explanatory, but reading a specific channel is not mentioned in the datasheet or user manual.
Many thanks
Through reading the user manual which I agree is a very good source of information on the majority of aspects, I have become familiar with how the A/D is set up and how it operates.
However, I was given the task of reading three channels of the A/D when operating it in software mode. This caused confussion between the terminology of user manual and that given in the task, as the terminology of the user manual didnt make it clear that in programmable mode you had to start and stop each channel one at a time using the ADCR register in order to read from a specific channel.
Thank you for your help, but I dont think I would of got a response unless I posted my previous rant.
Exactly - but I'm not expected to spend time looking at manuals for processors I don't use on business hours, am I?
I normally answer when the question is related to processors I already know about. After all, I'm not any Keil employee. Just a user of Keil tools just like you.
I don't think that the manual is confusing. It states very clearly that you should only enable one channel in software mode.
ADCR b7:0 Selects which of the Ain3:0 (LPC2119/2129/2194) or Ain7:0 (LPC2292/2294) pins is (are) to be sampled and converted. Only bits 3:0 should be set to 1 in the 48 or 64 pin package. In software-controlled mode, only one of these bits should be 1. In hardware scan mode, any value containing 1 to 8 ones (1 to 4 ones in the 48 or 64 pin package) can be used. All zeroes is equivalent to 0x01.
Alex
Note that this is a different user asking a slightly different question for a different processor with a different ADC, even if both chips are in the LPC21xx family.
What do you mean?
The quote in my reply is from the LPC2119 user manual, that is exactly the mcu that the question refers to.