![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
my project is frequency to voltage converter using PIC. but i dont know suitable PIC for my project.. i am also dont know how to complete this project.. the project is to read input frequency and give the output in voltage.. for example like below.. input (hz) / output (v) 100 / 0.1 200 / 0.2 300 / 0.3 can i use 16f887a or 16f873?? i hope you all can help me.. thanks to all.. | |
| |
| | #2 |
|
there a easy way to do this and it works with any pic you check for frequency say on porta,0 Then output a voltage on portb using it as voltage divider like in the pic | |
| |
| | #3 |
| To be a little clearer, it's an R2R DAC - not just a 'voltage divider'. It's also pretty essential to feed it through a high impedance buffer, unless the load is already a high impedance.
| |
| |
| | #4 |
|
Nigel I'm not as smart as you I don't know whats it proper name but it works i used with the stamp. This gives greater details http://www.allaboutcircuits.com/vol_4/chpt_13/3.html | |
| |
| | #5 |
|
Natasya, what is the output supposed to do? How are you going to read the output voltage? | |
| |
| | #6 |
|
There's an easier way to do it. Everytime an input pulse / edge is detected you just get the PIC to make a fixed-period output pulse. Then average the output pulses into an RC filter. So if you want 100Hz = 0.1v (ie 1000Hz = 1v) just generate a 1000Hz/5 output pulse. Or 200uS. The benefit of this is that you can use the very bottom end PICs for it, like 10F or 12C series. | |
| |
| | #7 |
|
thanks all... actually i dont want use voltage divider... can i use the output in PWM and convert it to voltage??? MR RB, can yo explain in more detail what was you wrote here?? Thanks.. | |
| |
| | #8 | |
| Quote:
And you have the idea you test for 100hz then send a higher 1000hz which would give you 1 volt peak put a 10uf cap on it and it will look like 1 volt Last edited by be80be; 5th October 2009 at 01:44 AM. | ||
| |
| | #9 |
|
Bebe, do you have a schematic handy you could show the OP, what you said is a little confusing.
| |
| |
| | #10 |
|
Something like this would work your testing for 100hz if a 100 hz in you send back out a 1khz which with a filter capacitor looks like 1 volt If you want .1 volt send a 10khz out Last edited by be80be; 5th October 2009 at 02:39 AM. | |
| |
| | #11 |
|
Why not use an LM2917 frequency-to-voltage converter? Is it strictly PIC-based?
__________________ -The kinda guy who would improvise so much that you'd say "Here's 50 bucks for your Gigantron" http://vortexelectricaz.blogspot.com | |
| |
| | #12 |
| He can I was just letting use what he had
| |
| |
| | #13 | |
| Quote:
The beenfits are that it is very simple, you onlt need a simple PIC (no ADC or DAC or timers needed) and it has infinite resolution, which is impossible to get with a R2R DAC or any 8bit DAC. | ||
| |
| | #14 |
|
MR RB, has you done this project?? can u help me by sending the program and circuit... thanks... | |
| |
| | #15 |
|
This is all the help you should need. The code goes something like this; Code: ; Super simple freq - voltage converter. RomanBlack Oct 2009 ; connect input to PIC pin RA0 ; connect output RC filter from PIC pin RB0 ; 200uS delay means 1000Hz input = 1v DC output start btfsc PORTA.0 ; first wait for input to be low goto $-1 btfss PORTA.0 ; now wait for input to go high goto $-1 bsf PORTB.0 ; set output high nop ; enough nop's here to make 200uS delay nop ; or use your own 200uS delay code nop ; (etc) bcf PORTB.0 ; set output low again goto start | |
| |
|
| Tags |
| converter, frequency, pic, voltage |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| constant dc output voltage for frequency to voltage converter | nnb29 | Electronic Projects Design/Ideas/Reviews | 13 | 6th September 2009 01:03 PM |
| Voltage to Frequency Converter | km | General Electronics Chat | 39 | 3rd March 2009 11:54 AM |
| Voltage to Frequency Converter | viju | General Electronics Chat | 3 | 27th October 2008 09:19 AM |
| Voltage to frequency converter with PIC | Andy_123 | Micro Controllers | 25 | 6th April 2004 02:19 AM |
| Voltage to frequency converter with PIC | Andy_123 | Electronic Projects Design/Ideas/Reviews | 0 | 23rd March 2004 12:44 AM |