Um, quick no thought answer...but perhaps you should use capture and compare (CCP) instead of PWM. You'd probably want to process it in an interrupt, but in the ISR you can set any (or all) of the pins you want. Hope that helps, Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams Pic Dude wrote: > > Howdy all, > > Decided to convert my manual SW-coded PWM LED dimmer to > use the PWM feature built into the 16F872 instead, but... > > All 8 pins of Port C are already in use -- one port to > reduce flicker at low-ish frequencies. > > Port B has the switches, and uses the internal pullups. > Also, RB6:7 are open for ICSP later. Port A has one > A/D in use and drives the individual segment commons. > > As is become a trait with me, external components are > frowned upon, primarily due to space considerations, > when a SW solution exists. > > I haved used the internal PWM module yet, but from the > datasheet, I gather that to implement a dimmer, I will > need to setup the PWM, have it drive RC2 accordingly, > and I could monitor that pin to turn the display on/off > accordingly. Alternatively, I could use another > transistor driver, the collector of which would supply > the emitters of the 4 existing transistor drivers with > a PWM-modulated supply-rail signal. > > Few Q's... > Is this even the right way to do it? Or is there a > better way? > > Is there any way to do this w/o needing RC2? -- I'm > hoping for some internal way to read the PWM output, > since I don't need a physical I/O pin set. > > However, since the segments are on port C already, > perhaps I could find a way to monitor the change on > the CCP pin and adjust all the other segments > accordingly. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads