Jan-Erik, See imbedded answers below: ----- Original Message ----- From: "Jan-Erik Soderholm" To: Sent: Monday, March 29, 2004 10:31 AM Subject: Re: [PIC:] Odd PWM behavior on 16C617 > Edward Gisske wrote : > > > I am working of a 16C617 project and have been dealing with > > some annoying behavior on Port B. I am using B:3 as a PWM > > output. Everytime that I write to a*different* Port B pin,... > > How ? Using bcf/bsf with PORTB as the target ? Yes > > > I have to reinitialize B:3 high... > > What does "reinitialize" means ? Re-writing the TRISB reg ? > Or the PORTB reg ? I have to write a "1" to B:3 (PortB Register, not TRISB). > > > to unclamp the PWM output. > > In what way is the PWM output "clamped" ? If I don't write a 1 to B:3 the line delivers a greatly attenuated PWM signal of only about 0.5V P-P. I am using a Mathias ICE and this may be an artifact of the emulator. I don't know..... > > > Is this some sort of byproduct of the Read:Modify:Write > > issue, > > Could be, depends on what you actualy are doing. Can't say > since you don't realy tell us. > > > and does anyone know of a handy avoidance technique? > > *If* its the R-M-W problem, it's the standard shadow register > thing. But that could be hard if you are doing SW-PWM. But since > you already have a solution, maybe just build that into your > application ? I may have to do this, but it is a problem in that I need an uninterrupted PWM signal for this application. That is why I am looking for a cleaner "fix". Thanks, Ed > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.