CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PWM signal generation & questions

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
salgulsen



Joined: 16 Sep 2009
Posts: 21

View user's profile Send private message

PWM signal generation & questions
PostPosted: Mon Nov 09, 2009 12:15 pm     Reply with quote

Hi,

I'm using a high voltage power supply which outputs high voltage that is proportional to the input voltage. I've tried to use the hardware PWM function of a PIC16F877A (which has a 20 Mhz crystal) with a SSR which I use to drive a 12 V supply (and which has an on/off time of 0.1 ms). I thought I have to generate a pwm signal which is lower than 5000 Hz just to control the SSR and I thought the minimum PWM freq of the pic is 1220 Hz and it was enough to control the high voltage supply. But high voltage is supplied with 12V and there was very little change with the pwm duty cycle. (in mV scale)

So I tried a 4 Mhz crystal to get a lower freq PWM signal (I could be able to go down to 245 Hz) just to make sure I can control the device. I could manage to get a voltage change between 7-12V that is to be supplied to the high voltage device. But I couldn't manage to scale the whole voltage range.

How can you determine a "required PWM signal frequency" of a device? I'm now trying to find a good PWM frequency that I can change the input voltage in experimental ways. I mean, I generated a PWM signal that is 1220 Hz at first, now I'm using 245 Hz which is not optimum and I don't know how to find an optimum PWM freq.

Any help is appreciated..Thank you!

*Edit : I've found some software PWM algorithms. Deleted the second question
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group