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

Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm