piclist 2001\03\08\104237a >
Thread: PWM glitch-free updates
www.piclist.com/techref/microchip/ios.htm?key=pwm
flavicon
face BY : Mike Mansheim email (remove spam text)



> What's the best strategy for dealing with updating
> a 10-bit PWM value asynchronously with TMR2?

> It looks like you could get a glitch if the update
> happens to occur just as TMR2 is overflowing.

quote from the F87x data sheet:
"The CCPR1H register and a 2-bit internal latch are used to double buffer
the PWM duty cycle.  This double buffering is essential for glitchless
PWM operation".
and (earlier in the discussion):
"...but the duty cycle value is not latched into CCPR1H until after a
match between PR2 and TMR2 occurs..."

From the comments by Spehro & Olin, is this all hooey??

(by the way, my applications of pwm typically wouldn't care about an
occasional glitch, but now I'm curious)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


<OF7C739679.934CD535-ON86256A09.0055397C@graco.com>

See also: www.piclist.com/techref/microchip/ios.htm?key=pwm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) PWM glitch-free updates

month overview.

new search...