Discussion in "PIC Microcontroller Discussion" started by    nicholastyc    May 9, 2008.
Fri May 09 2008, 01:15 pm
#1
Hi,
I need help on generating PWM signal to the output, iread over the tutorials about the PWM signal, i m sorry, because i really dunno much about the programming, my question is, i don understand about the timer0 function, and i m using pic12f629, and 3 PWM outputs needed, 2nd output is 50 width slower than the 1st output, and 3rd output is 50 witdh slower than 2nd output.
can some1 who has spare time, can provide me a PWM code in ASM mode and explanation, i m willing to learn on how to make a successful program.

Thank you so much...


[ Edited Fri May 09 2008, 01:40 pm ]
Sun May 11 2008, 11:36 am
#2
hi Ajay i need some help on generating PWM signal...please show me some example of programming the PWM code in ASM and the tutorial is not the pic type i m using...i m bit confused on that Timer0 ...
please lend me a hand on this..thank you.
Mon May 12 2008, 05:59 am
#3
do you know how to use PIC timers?
all you need to do is make pin high and low for specified times..

Timer0 can be configured for counting from 00 to FFH
let say you want a PWM signal with x is width of high so width of low will be FF - x
such that total will remain FF.

when x count is over then you need to change state of pin and load value FF-x in timer after that count is over change state of pin and reload counter to x and so on..
this reloading will be done in interrupt service routine of timer0.

Please write a small code i will rectify it if i find and mistake.
 nicholastyc like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am