:; Struggling With PWM ::

Status
Not open for further replies.
hard to say in general but usually it just means 1 match register (duty cycle reg) per PWM output. Some micros have multiple match regs associated with a given timer - the msp430, for example, has 2 or (iirc) more depending on the version.
 
hi, mike

I think i understand the main part of your code, but I dont understand the part where you record the state - why do you 'swapf STATUS,W' twiee? surely this does nothing? perhaps I am not understanding something about interrupts?

Thanks
 
Well this thread is over 12 months old, but SwapF is used to save and restore a register without affecting the STATUS bits.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…