PDA

View Full Version : Digital Pot



Tastature
- 27th July 2008, 13:49
Hey

I need this code:
How to change 5 V on some . Sample when portb.0=1 (program).... program is like pot, it relaxation 5 volt, on 4.9 then 4.8..4.7...0. How can i do that? My english is bad i forget some things, sorry

skimask
- 27th July 2008, 18:47
Hey
I need this code:
You'd get a lot more help by writing some code and asking other people to help you figure out why it doesn't work VS. asking others to write code for you.


How to change 5 V on some . Sample when portb.0=1 (program).... program is like pot, it relaxation 5 volt, on 4.9 then 4.8..4.7...0. How can i do that? My english is bad i forget some things, sorry
A dozen different ways to do this...
One way, yes, connect an external digital pot (I've used the Xicor types), and control it.
Another way, use the PWM module (or software PWM) across an R/C network, vary the duty cycle of the PWM output to change the average voltage across the cap. Probably want to follow the R/C with an Op-Amp so any loads won't change the voltage across the cap much.

Tastature
- 29th July 2008, 15:27
Another way, use the PWM module (or software PWM) across an R/C network, vary the duty cycle of the PWM output to change the average voltage across the cap. Probably want to follow the R/C with an Op-Amp so any loads won't change the voltage across the cap much.
Can you post samo exaple, i dont understand good?

skimask
- 29th July 2008, 16:20
Can you post samo exaple, i dont understand good?

PWM - pulse width modulation (wikipedia)
http://en.wikipedia.org/wiki/Pulse-width_modulation
1st hit in Google...

PWM in a PIC...(search phrase 'pwm microchip.com')
ww1.microchip.com/downloads/en/AppNotes/00538c.pdf

1st hit in Google...

1st hit both times...