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.
Hii all.This time I'm struck with the ADC problem.My code is running successfully.I'm using a ready-made board of LPC2148 which has a potentiometer connected with its pin 13 of the MCU i.e., AD0.1.The potentiometer is used to supply various analog voltage to the pin 13. Now the problems are -- 1:->the result of the ADC conversion of a predefined voltage is not coming in the AD0DR1 register..but its coming in the global result register i.e., in the AD0GDR. I dont know why this is happening 2:->I'm sending the result of ADC conversion to P1.16 to P1.23 which has LED connection to it..and the pattern of LED blinking is rightfully going with the ADC result.If i power up the development board with a predefined analog volatage(say 2V) the result is coming accordingly..but now if i change the value of the potentiometer(say to 3V) then the new result isn't coming..and the result of 2V continues to blink at the LEDs.If I reset the board or switch on the board after switching it off then the right value of 3V is showing up..what should i do
Yeah sir u r rite...i have used a multimeter to chck teh values...
LPC2148 has internal voltage reference..so whats the use of a dedicated external sorce..and moreover how to use it.I'l check it using the oscilloscope and let u knw about the noise part
"LPC2148 has internal voltage reference..so whats the use of a dedicated external sorce..and moreover how to use it."
What do you mean by that?
The 2148 has Vref, Vssa, Vdda signals.
Vssa: Analog Ground: 0 V reference. This should nominally be the same voltage as VSS, but should be isolated to minimize noise and error.
Vdda: Analog 3.3 V Power Supply: This should be nominally the same voltage as VDD but should be isolated to minimize noise and error. This voltage is used to power the ADC(s).
Vref: A/D Converter Reference: This should be nominally the same voltage as VDD but should be isolated to minimize noise and error. Level on this pin is used as a reference for A/D convertor.
The only bad thing is that NXP seems to have a hard time to decide what voltages that are allowed on Vref.
6.8.1 of product datasheet (Rev 04 17 nov 2008) says: Measurement range of 0 V to VREF (2.0 V <= VREF <= VDDA).
8 of product datasheet says: Min 2.5V, Typical 3.3V, Max Vdda
yeah u r rite what i mean to say is that in my development board the Vref pin is internally connected with Vcc
One thing you have not told us before, is that you are using a development board. Or more explicitly which board. But now we know that it isn't a Keil MCB2140.
I have said that I'm using a board in my very first posting..i guess u missed it.Its from robokits a cmpany from rajasthan(india) and its written in their website about the board that...Designed as per keil MCB2130 dropping some features.
I have checked the connection with the oscilloscope there are some noise signal creeping into the ADC pin.
Yes, I did suspect you did use a board. But in the original post, you only said "ready-made board" which might include a custom-designed board. And from what you say now, it is a customization based on a MCB2130.
What parts of the MCB2130 design did you drop? The MCB2130 has a strap J11 to select if VREF should be connected to +3.3V or not, so it does allow the use of a separate voltage reference.
One thing with the MCB2130 is that it is a bit "light" when it comes to filtering the Vref, Vdda and Vssa. It works fine if you have very little noise on the board. More filtering should be added if you have hardware that pulses high currents on the PCB.