Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM by variable RC Oscillator ... ?!

Status
Not open for further replies.

aljamri

Member
Hi

After many failed trials of using a Potentiometer to adjust PIC output (DAC) and (ADC), I'm thinking to try making a variable RC Oscillator and get the clock change to get some variable PWM output. Is this sounds rational or not ? :)
 

Attachments

  • untitled.GIF
    untitled.GIF
    10.5 KB · Views: 209
Last edited by a moderator:
more search in this subject leads to this:

**broken link removed**
 
I'm thinking to try making a variable RC Oscillator and get the clock change to get some variable PWM output. Is this sounds rational or not ? :)

That is a complicated way to get variable frequency PWM. Is that what you want? You won't be able to (easily) change the duty cycle of the PWM with a changing oscillator frequency.

After many failed trials of using a Potentiometer to adjust PIC output (DAC) and (ADC)
When you fail in something that simple should you really change your plans to more complicated one?
Why did you fail? Did you have trouble with coding and programming the PIC?
 
Thank you misterT for your interest

That is a complicated way to get variable frequency PWM. Is that what you want?

Yes that what I need for now "variable frequency PWM" as an introduction into PIC analog issues.

You won't be able to (easily) change the duty cycle of the PWM with a changing oscillator frequency.
It was a crazy idea came to my mind :)

When you fail in something that simple should you really change your plans to more complicated one?
I thought it is easier.


Why did you fail? Did you have trouble with coding and programming the PIC?

In fact at the beginning I had no problem with programming, because I was following N.G. tutorial, may be the problem was with my circuit "analog board", it took a lot of my time and effort.

lately I found some direct and simple ways to test analog abilities for PIC using simple voltage reference and LED to show that it deems and bright. It is in this case where I had problem with programming since I don’t know which register I have to deal with.

All this made me to give up PIC analog issues
 
Now I'm really confused about what you are trying to do :) Which one are you trying to control; the frequency of PWM or the duty cycle of PWM? or both?
 
What in mined is how to use PIC to control a load ( LED or even LCD segments), by adjusting a Potintiometer, to show a kind of inication in response to the POT changing. This a PIC analog issue, isnt it ?
 
You do realize that changing the frequency of PWM signal does not change the average voltage? It does not make a LED shine brighter or dimmer. You need to change the duty cycle of PWM in order to control load.

But your idea of changing the speed of the RC oscillator with potentiometer is perfectly good if you want to make a LED blink faster and slower.
 
Last edited:
Thank you to you misterT for your patient. I feel that you want to get rid of me by saying :)
your idea of changing the speed of the RC oscillator with potentiometer is perfectly good if you want to make a LED blink faster and slower.

any way I told you the idea just poped up in my mined and I post it here, but our discussion reminded me about my failure to use PIC in any Analog In or Out applications. I may start a fresh thread seeking advices regarding that.

Thanks
 
I don't want to get rid of you. Just answered your original question :) Your idea is perfectly good and rational if you want to control the frequency of PWM. I'm just not convinced that controlling the frequency of PWM is what you really want to do. You said you wanted to control PWM.. and that is a little bit confusing because there are two things to control; frequency and duty-cycle. You can't control duty-cycle by varying the oscillator frequency.
 
Last edited:
No problem misterT, I was just joking. Thank you for your help, and as I said I'll start a new thread regarding PIC analog implementations later because I'm doing a couple of projects for now, and I'll PM you to participate.

Thanks.
 
Last edited:
Here is a project that sets the frequency of the outputs via a pot:
**broken link removed**

See the .asm
<snip: spam>
left index: Stepper Motor Controller

or this one:
**broken link removed**

Servo Motor Controller


 
Last edited by a moderator:
Status
Not open for further replies.

Latest threads

Back
Top