Search found 2121 matches

by medelec35
Fri Jun 19, 2026 7:45 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Hi Bob, not a problem. I just fitted a 270R pullup and 150R Test resistor on my hardware, to try and replicate your setup. This is the result at 4.5V VDD R test1.png The actual resistance of the test resistor is 150.6R The R result is 149.1 Therefore the accuracy is 1.0% Not bad at all for a 10bit A...
by medelec35
Thu Jun 18, 2026 7:21 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Hi Bob. Have you changed the PullupResistor value ? With it being 267, it's working on my hardware and simulation. This is the embedded UART results: Hardware results Read 320.png Calculation: read 320 calculations.png Simulation results: read 320 simulation results.png As you can see they all match...
by medelec35
Wed Jun 17, 2026 11:45 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Formula looks correct. For a wider range the first ratiometric formula I gave would be best, but less accurate with a 10bit ADC. There is not else that can be done. Using R = PullUpResistor * FLOAT read / (1023.0 - FLOAT read) can you let me know what the value of read is (sending it to your display...
by medelec35
Wed Jun 17, 2026 9:58 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Hi Bob. That is a lot better 3.2% instead of 39.2% that has improved by a factor of 10! Is the voltage across the supply pins of the microcontroller exactly 5100.0 mV? I used that in an example but if your chip supply is different you need to replace the 5100.0 with your exact VDD voltage. To make l...
by medelec35
Wed Jun 17, 2026 5:58 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Just found my 16F1824, which using the same datasheet as 16F1829.
Set FVR to 2.048V , following my instructions
Applied a 1.024V to ADC pin and the ADC result is 501 which is not far off at all!
by medelec35
Wed Jun 17, 2026 5:50 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Hi Bob. I have looked into enabling FVR for the 16F1829. 1. Within potentiometer properties make sure VRef option is set set to FVR (which you have) 2. Determine the correct value of FVRCON For FVR the datasheet states 01 = ADC Fixed Voltage Reference Peripheral output is 1x (1.024V) 10 = ADC Fixed ...
by medelec35
Wed Jun 17, 2026 1:41 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Just thought on the original method.
You can check the expression is not being type cast by adding in a calculation box just after ADC component

Code: Select all

read = 320
THen check both hardware and simulation shows the same values of

Code: Select all

121.5
by medelec35
Wed Jun 17, 2026 1:13 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 29
Views: 2128

Re: Using FVR on a adc channel

Hi Bob. You are using a fixed resistor connected to VDD and an unknown resistor connected to ground. Since the formula relies on Vref being the same as VDD, they cancel out. If you want to use FVR, since FVR isn't the same as VDD anymore, you will need a different formula and you will need to know V...
by medelec35
Thu Jun 11, 2026 10:06 am
Forum: General
Topic: Compiler ERROR PIC18F57Q84
Replies: 19
Views: 2313

Re: Compiler ERROR PIC18F57Q84

Hello. Thanks for the requested file. I have check the hex file and code from the microcontroller looks correct for toggling a pin. Decoding the hex file it looks like the correct pin is being assigned and toggled. An issue I could potentially see with your configuration settings is LVP is enaboed. ...
by medelec35
Wed Jun 10, 2026 1:20 pm
Forum: General
Topic: Compiler ERROR PIC18F57Q84
Replies: 19
Views: 2313

Re: Compiler ERROR PIC18F57Q84

Hello I am uploading the hexadecimal file, which was compiled in FC11 and read from the downloaded file. No, that was not what I wanted, maybe it was my wording. Can you read the microcontrollers memory including config settings and upload it within this topic. What I require is for you to connect t...