I have another issue please
4. It said in the datasheet:
What does it mean "input resistance, signal"?
5.
When i used circuit A, i received V_analog = 0.709V, which is around 5% error so its acceptable.
But when i used circuit B, i recived 0.7V which is weird because it says that the current in the circuit was: (1.5V - 0.7V) / 51 = 15mA, and according to datasheet, VF = 0.7V @ 45mA, which is large error.
What is the problem then with circuit B?
hi alpha,
If you are only working with +V input signals, I would set the -Vref to 0V.
I have a 3.3V that i supply to the MCU with external regulator, and I have an internal 1.25V regulator of MCU which I dont think it uses for any other purpose.Set the +Vref to +3.3V [thats internal.?]
To convert the 'count to a 'voltage' use this formula:
Vinp[signal] = (3.3V) * (count/8192)
For example: say the count was 4096
Vinp = 3.3V * (4096/8192) = +1.65V
I'll reply to the other questions in a later post.
You mean connection like this:for example assume that you connected a 1.5V battery via a series resistor to the adc inpout, Let this resistor be say 197K,,, if you now measured with a DVM the voltage on the adc pin it would only be 0.75V...so your adc conversion 'count' would wrong.
You mean to keep RB less then 10Kohm so it so that RB || Rinternal_adc would be close to RB?On PIC's it recommended that you keep the resistance of the input signal voltage less than 10K.
I'm using 1N4007 which at VF = 0.7V, its current (by graph) should be 45mA.Ref the diode circuit which diode are you using.?
What was connected to the ADC input when this occurred.?It is said that for single-ended input pin, the result is always possitive, thats why i was surprised to recevie 65,435 in the the registers (when i shorted ADC input to ground), becasue it represents a negative number in 2's complement representation (It means that the MSB bit in ADCH is '1').
You know why it happend?
No, it wont be wrong to use a 1.25Vref.I have a 3.3V that i supply to the MCU with external regulator, and I have an internal 1.25V regulator of MCU which I dont think it uses for any other purpose.
Will it be wrong to use the 1.25V as VREF instead of the 3.3V?
Yes, I have just rounded it up.I'll reply to the other questions in a later post.
Dont you mean 2^(13) - 1 = 8191?
Look at image #1In this case, both the FLUKE and the ADC would show 0.75V.
Why do you say that the FLUKE wont show 0.75V?
(after enough time for its internal cap. to charge, it should show 0.75V).
How did you reach 2^11?
15-14-13-12-11-10-9-8-7-6-5-4-3-2-1-0
If you remove bits 15, 1, 0, then you are left with 13 bits unsigned number.
So its V_analig = V_digital / (2^13-1) * VREF.
GND was connected to ADC input.hi alpha.
What was connected to the ADC input when this occurred.?
No, it wont be wrong to use a 1.25Vref.
The Vref is often chosen to suit the scaling of the input voltage being converted.
eg: if you had a sensor which gave an outout of 0v thru 1.5v, it would logical to use a 1.25Vref.
if the sensor had say an output range of 2.5v, I would use the Vint ref of 2.5v
Thank you, I understand it now.Look at image #1
This is VERY basic diagram, read the PIC 16F series datasheet for a full explanation.
Look at image #2 for the diode, I amke it about ~ 10mA for 0.7V
Thank you, I understand it now.
If i have the ADC remained ON even when it doesnt executes conversion, will it solve the problem?
The 12-bit value should be stored into bits 15-5
15-14-13-12-11-10-9-8-7-6-5-4-3-2-1-0 (the 12-bit result is highlited)
bit 15 is sign (ignore)
So when the input voltage is equal to Vref, the reading is 11111111111 = 2047 = 2^11-1
It dosnt really work that way, when you give the MCU a GO command it will do the conversion.
Ref 1N4007 image.
I see, then i'll decrease the resistance in the circuit.
I really thank you! i learned a lot from you!
Regarding the ADC capacitance,
Is the capacitor being charged only during the conversion?
Meaning when conversions arent being executed, the Vinp that you skected is not connected to the external circuit?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?