Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Isolate analog voltage from ICSP

Status
Not open for further replies.

Overclocked

Member
I am using a 18F13k22, but need to use an external voltage reference. The pin for +Vref on the PIC is also used by ICSP (PGC to be specific). Is there anyway to isolate the voltage reference during programming, but also during use as to not effect the accuracy of the reading of Vref? ICSP will only be used during programming and not during the final application.
 
Would it matter?? During programming that pin is an input... Is your vref a low impedance input? I use the pic16f1825 which has RA0 and Ra1 connected to a joystick... I have the joystick connected with the same connector as the pickit3... BUT!! I have pullup resistors which don't affect the programming..

That chip has a very good FVR... 32 bits for an internal vref Would you be better off with that?
 
Would it matter?? During programming that pin is an input... Is your vref a low impedance input? I use the pic16f1825 which has RA0 and Ra1 connected to a joystick... I have the joystick connected with the same connector as the pickit3... BUT!! I have pullup resistors which don't affect the programming..

That chip has a very good FVR... 32 bits for an internal vref Would you be better off with that?

The dynamic output impedance is rated at 0.2 Ohms. I couldnt find input impedance. I know the chip has a on board vref, but it varies wildly, from -8% to +6%. The voltage reference I have on hand is rated at 0.5%, which is more than enough for what I need.

LM4040C20IDCKR is my intended vref (its what I have in stock. Trying to use up stock before buying anything else)
**broken link removed**
 
Cheapest way is to use a dual 6 way header and blank if off when not using it.. Another possibility is to put a low ppm resistor in series with the Vref ( check the voltage is still correct ).

Other than that an analogue switch??
 
Two I/O pins Left. Since it consumes a a small amount of current, I could control it with a I/O pin. Turn it on before I need a reading. During programming it will be off and thus be reversed biased since no current will be flowing.

Zener voltage:2.048 V
Iz = 60uA
IL (into the ADC pin): 100uA (I am estimating this)
VS: 3.3v to 3V
My calculated resistor to bias the voltage reference is 8.346kOhms. I think this falls into the recommended impedance for the ADC
 
keep your power and ground away from any clocking signal pwm spi serial don't run them over or under your ADC tracks.
And read this
When the Fixed Voltage Reference module is enabled, it will require some time for the reference and its amplifier circuits to stabilize. The user program must include a small delay routine to allow the module to settle. The FVR1ST stable bit of the VREFCON0 register also indicates that the FVR has been operating long enough to be stable. See Section 25.0 “Electrical Specifications” for the minimum delay requirement.

Also take samples ACD read spitout the first reads and then sample say 10 times see if it's not way better.
 
You certainly need to disconnect VR for programming.

You may be able to run PIC with programmer connected. About all Microchip programmers have pull-down resistors around 4.7K. A typical VR should be able to drive it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top