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.

vref+/- on captured mode

Status
Not open for further replies.

lakis

New Member
Hi guys .I want to count the period of waveform that it will come from an external circuit using the ccp1.
My question is should i connect the vref+ on vdd and the vref- on the ground or is not necessary as long my waveform is until 5v . I am using pic18f4520.
Thank you
 
You are using the ADC?
If you use the ADC connect vref- to something, usually 0 volts.
If you use the ADC connect vref+ to the most positive voltage you want to measure. Usually 5V or 3.3V.

The ADC will not be happy with vref not connected.
 
OP, the CCP input triggers a capture upon the state change of the input. So your signal needs to change from a logic hi to lo or vice versa based on your config. Have a look at FIGURE 27-31 in the data sheet for the voltages associated with Hi and Lo states for a ST (Schmitt trigger input).

If your signal does not conform u may need to run it thru an opamp to adjust it. Remember the optimum PIC input impedance is 10K or less.

EDIt: Look at tip # 12 here, it may help...
https://www.electro-tech-online.com/custompdfs/2012/12/41215c.pdf
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top