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.

POTENSIOMETRE PROGRAM IN C LANGUAGE FOR PIC

Status
Not open for further replies.

FRAJ220

Newbie level 3
Joined
Nov 12, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
TUNIS
Activity points
1,299
HELLO TO ALL
Dear friends I have a problem and I want you my help, I want a functional language program c for metrre a pic micro controller.
I want to make a potonsiometre programmeble between 0 and 10v
:?:
 

What do you mean? You want to read the analog value of a potentiometer as an input, or you want to connect a digital potentiometerchip to a PIC? Or do you just want to create a programmable output voltage between 0 and 10V? If it is the latter that you want, you can generate a 0-5V voltage using PWM and a low-pass filter, and than multiply this voltage with 2 using a non-inverting opamp circuit.
 

i want to create a programmable output voltage between 0 and 10V
pls send me the schematique
 

So: PWM-output -> lowpass filter (R-C) -> 2x non-inverting opamp
76_1258043795.png


If you chose R2=R3, you have a multiplication of 2, which is what you want if your microcontroller is powered with 5V. R4 is a small resistor to protect the output of the opamp (e.g. 100 ohm). R1 and C1 are the low-pass filter time constants. Their values depend on your PWM-frequency and how fast the analog output has to be able to change in value.
 

no it's never this i want command whith pic
 

The circuit miredox posted *is* controllable with the PIC - you drive the PWM input with one of the I/O pins on the PIC (one connected to the PWM hardware within the PIC would be ideal, but if that's not possible then you can generate your PWM signal in software and use any available pin), and the voltage at OUT will vary according to the mark:space ratio on the PWM input.
 

please anyone tell me what would be the exact value(min-max) to get 0-5 or 0-10 volts output. R1,R2,C1,R3 value...

please post.
thanks to every one
 

For 0-5V: you don't need this circuit, only the low-pass filter, unless you need a buffered output. Then remove R2 and short R3.
For 0-10V: R2 =R3 as stated, value is not critical, e.g. 2x 10K. For C1 and R1, you have to determine this yourself, depending on you application. Its a low-pass filter which can be computed with the following formula: fc = 1/(2.pi.R.C). Have a look at wikipedia.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top