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.
Hi Burt
let us overpass the first part of capturing a signal fed to rc.2 pin . I have build an oscillator using comparator1 hoping to use to measure capacitance. I found that I have to keep that oscillator working by making the code loop back over few instructions. If I try to do any thing else the oscillator stops (i.e if I make more instructions in the loop).How can I make that oscillator run independently?
You can use the chips OSC I don't no how fast you need it but with the timer to divide it and send out a pin could be done basically in the background or even PWM both should work. Full time
Hi Burt
Osc1 is connected to the xtal . What actually I want is using the comparator rc oscillator to measure the capacitance by using ccp1.When I make code to do that, oscillator stops ,you have to knock it all the time . I believe I can use an interrupt, to load the timer when signal is captured and go back after that to knock that oscillator , but I do not know how to make an interrupt when capture flag is 1. I do not want use an external oscillator. I attached the circuit.View attachment 62611
Thanks
Obaid
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.