In a message dated 97-03-05 01:20:26 EST, you write: << Hello Everyone, I need to produce a variable PWM output based on a 8 bit hex number that corresponds to the percentage duty cycle of the PWM. My basic idea was use the interupt on overflow feature of timer0. So the waveform would look like this: -------------------- | | | | | | ---------- --------------- $FF-PWM PWM The pseudo code would look something like this: Interupt_Service_Routine If the output was low last time { set the output high set timer0 to $FF - PWM //Set Timer to Over Flow PWM latter } else { set the output low set timer0 to PWM //Set Timer to Over Flow $FF-PWM latter } End_Service_Routine Ok, well that seems simple enough to implement to me but what I would really like to do is try this with one of the cheaper noninterupt based PICs. The problem is that the PIC will also be doing serial comms so it can't be totally tied up with making the PWM signal although there isn't alot else going on. I would appreciate comment and suggestions on both the interupt and noninterupt based methods. Thanks Guys, Ben >> Ben, I have done just this. Our machine uses many 16F84s to control speed of fan motors, pumps, dynamic particle brakes etc. It works well. I chose to use the 1684 because of the interupt capability. My machine has 14 pics all speaking through what I call a speak-when-spoken-to rs232 protocol. Interupts simplify the code dramatically. 1684s are only $5.00 in onsy quantity from Digikey. I found it pretty much imposible to preform error free serial and perform un-interupted PWM. In areas where it didn't matter if I lost control for a few milliseconds, such as the fan speed control, I turn off the output while I service the RS232 routines. When recieving data you hear a little change in pitch of the fan for a split second. But in areas where I needed better control (such as the particle brake used for web tensioning. If I used the same tecnique as the fan the web would vibrate or pulse. I need absoulute precise tension control) I went to two pics. The first one does nothing but watch the RS232 and parse the command strings. It takes the data and presents it on port B (The only 8 bit port in the part). The second pic does nothing but PWM. It reads its portB and uses the number presented on the port as the PWM value. If you are bent on using one pic then you better pick a pic with onboard USART. Hope this helps Dave Duley V.P. DreiTek Inc.