Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need helps on Frequency-to-Voltage project using AT89C51

Status
Not open for further replies.

semiconductor

Full Member level 4
Joined
Apr 4, 2003
Messages
236
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
2,735
This is my assignment:
Using MCU to implement the following job
- Input: pulse with frequency f (1<=f <= 4.2 Hz)
- Output: coressponding voltage (<=10VDC)
Eg.
If f = 4 Hz, output voltage is 10V
If f = 2 Hz output voltage is 5V

Can you recommend me some solutions to this design or some website references related to this problem.


I’m planning to using AT89C51, I intend to measure the duration of fulse to calculate the frequency and compute the corresponding voltage output. Is this ok? I’ll programming in Keil C environment
 

You can use Timer2 to generate, say, 100µs (1ms or other, dependig on required accuracy) interrupts. This will give you a time base. Now just count these 100µs interrupts between two consecutive falling (or rising) edges of the input signal. The result can be used to generate PWM and with an opamp/LPF converted to dc voltage in the range 0-10V.
Other alternative is to use external DAC and amplify 0-5V to 0-10V ...
Regards,
IanP
 

First, thank you for your recommendation.
I decided to use DAC0808LCN as my Digital - to - Analog Converter. This is the first time I use this one. But it seems to be difficult to implement!

My PSU can supply only 0-24VDC. But DAC0808 requires negative supply (as indicated in datasheet). How can I use DAC0808 to convert 8-bit number into analog voltage from 0 ÷ 10 VDC at output without negative supply voltage for DAC0808.

Thank you for all suggestions!
 

search in

**broken link removed**
you can find the single supply dac

you also order free sample
 

you can use with LM331( V/f converter)
 

+/-12V of single 24V can be easily generated. One option is to implement active voltage divider that divides any input voltage into two identical voltages and created "middle" point will be used as the "new 0V". This technique is called "virtual ground" and some examples of it you can find here:
https://tangentsoft.net/elec/vgrounds.html
Having +/-12V you can use standard voltage regulators such as 7805 and 7905 and generate +/-5V required by DAC.
Regards,
IanP
 

if a square wave with frequency of at least 0.5 Hz (minimum value), how can I measure it? (maximum value of 5Hz.

Can you recommend me some techniques and solutions using AT89C51?

Thank!
 

i connect the negative input power and reference pins to groud.and ur DAC08 will work, i tried it and it work normal.exactly like the 741opamp.

my output voltage will only fall between ref+ and 0 volt as u really want in ur assignment.


good luck
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top