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.

Using VRef as a D/A output

Status
Not open for further replies.

Azaruk

Member level 1
Joined
Feb 12, 2007
Messages
37
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,572
I am using SRF04 in a sonar application.

I need the range to be displayed on an LED bargraph - LM3914 prefrably.

I have the SRF04 echo captured through the CCP module, which results in a 16-bit value.

How do I scale the 16-bit value into a 4-bit representation to present to the VRef module to give me a voltage level proportional to the SRF04 echo signal length.

I'm sure there's a imple solution, but my mind has gone blank over this, and what little hair I have left is steadily being pulled out!

Any ideas?
 

plusminus

Full Member level 1
Joined
Jul 27, 2007
Messages
96
Helped
15
Reputation
30
Reaction score
3
Trophy points
1,288
Location
the Netherlands
Activity points
1,804
One very simple solution is to use only the 4 MSB of the 16 bit signal directly to the 4 bit of the led bar.

An other solution can be to convert the 16bit value to a dc value with a D/A converter. Then use the dc value direct to the input of the LM3914.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top