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 CCS Technical Support

Can use PWM in Timer0 interrupt

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



Joined: 01 Jun 2011
Posts: 19
Location: INDIA

View user's profile Send private message MSN Messenger

Can use PWM in Timer0 interrupt
PostPosted: Tue Aug 02, 2011 12:41 am     Reply with quote

I am using 16F684 to read 2 ADC channel and generate PWM according to ADC input. Channel 5 reads input supply and channel 2 reads temp using NTC with preset by making divider. If channel 5 input is in between 3-4.5 then it give duty output from 0.2 to 100%, below 3V input duty Out remains at 0.2% and above 4.5V output remains at 100%.
Also PWM output varies in accordance with reading temp. Using channel 2 if channel 2 input voltage is below 3.700V (< 60 deg temp.) then PWM output remain as output from channel 5, and if channel 2 input voltage above 4.090V (> 75 deg temp.) and channel 5 input above 20% then PWM output remain as 20% duty. Else if input of channel 5 below 20 % then output same as input to channel 5. I'm facing a problem when temp temp rise from 60 to 75 deg. When level change from one count to another it gives a fluctuation in PWM duty. Can anyone give me idea to avoid fluctuation ?
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