I am using ADC0 sequencer 1 with 3 different inputs.the values in the register changing continuously.how can i get three analogue inputs after conversion ho can i read them from register.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using ADC0 sequencer 1 with 3 different inputs.the values in the register changing continuously.how can i get three analogue inputs after conversion ho can i read them from register.
Your post is far clearer (now) w/the inclusion of your code - poster Robert and I appreciate its inclusion.
You write of "sending" (voltages?) to your 3 Analog Channels. "Applying or inputting" voltages to the MCU's ADC is the "more usual" means of describing such voltage introduction. (sending most always applies to data transfer)
Your code looks similar to "Single_ended.c" found in "Examples/Peripherals" - IIRC that code may not use "interrupts" - which greatly speeds & simplifies your task.
You report "not being sure of your ADC values" - yet you don't describe those values - and they may prove useful to your diagnostic crüe...
I don't understand what are you trying to explain.how can I confirm my adc is working.
Kindly provide these details:
Your choice of introducing both 0V and 3V3 proves of little value. (those 2 levels are at the ADC's extremes - which may reduce your accuracy by one-half)
Should your ADC voltages still "disturb" - outlined below is a "quick/dirty" means to generate various voltages - with the minimum of parts.
The input voltages you may (more properly/effectively) provide can be (easily) created via 8, 1K resistors - configured as simple (3 resistors in series) voltage dividers. (such 3 resistor chain ties to 3V3 and Gnd - you tap at the first resistor (one of its ends @ Gnd - thus 3V3/3 results and is fed to the ADC); second set of 3 Rs taps at the 2nd & 3rd "R junction" (yields (3V3 * 2)/3; and just 2 resistors (again w/3V3 impressed - feed the 3rd ADC channel. (yielding 3V3/2) If a simple op-amp is available - those resistors may tie into the amp's (+) terminal - w/the amp configured as "voltage follower."
Again you are NOT "sending" such voltages - your are "introducing" them to the MCU's ADC.
cb1_mobile said:can you "switch" away from the "internal ADC reference?" (as this simplifies your code)
Good catch. I haven't used a variant with the internal reference. I took a quick look at it and my advice would be to stay away from it unless you really know what you're doing.
Robert
i am not using internal reference.could you please explain in simple words.what input i should apply at adc analogue inputs to check if it is working or not.
Had I not done - just that - several posts earlier - today? (i.e. via description of 3 resistors - series connected - powered by 3V3 and Gnd?
I don't know how to write "simpler."
Earlier your posted code contained, "ADCReferenceSet(ADC0_BASE, ADC_REF_INT);" did it not?
If you "list" what is NOT understood - another description may be applied - is there not another person (nearby) who may read & better explain?
rabbia qamar said:i am creating these voltages from AC opal RT model.
Umm....
Ummm.....
Well, I suppose if you are going to violate KISS there might be something said for going whole hog (probably not polite but something). Good heavens.
There's so many ways this could go badly.
Two suggestions
Robert
rabbia qamar said:...am connecting ADC correctly and i am getting correct results ... (on) ... one channel...(only!)...
Would it not make sense then to, "Alter your voltage source connection from that (succeeding) channel to the (failing) channels - but (only) one (new) connection at a time. Repeat the test, note & report your results. This IS "KISS" - your job is to confirm that you are (potentially) injecting that same (succeeding) voltage into the failing channels - which enables you to better detect "misconnections." (which seems most likely - at this early stage in your diagnostics.)
This description - only one channel (apparently) working and "locations" changing - were not supplied earlier...