Assembly language PWM
February 21, 2010
Right so I am using a PIC18f4520
trying to get PWM working, I know how to selec the values for the PR2 register using the equation listed in the manual and also which prescale value to select, Its just how I write my code I am having trouble with.
I think I am missing something out, I know its only about 8 lines of code to use the pulsewidth modulation pin, is there any way someone could give me an example bit of code or at least list the steps to take to implement a code?
say I am using a 10MegXtal and the speed and duty cycle is up to you..