Dave Turner wrote: > Well, I'm not sure if it's because we're doing an entirely different > think, but his pwm function is 105 lines. Mine is 26. Here is mine > so far (the part I asked this question about goes after the on and off > instructions, replacing the porta,0: His == Scott's PWM routine. Dave, You can optimize my routine by deleting all of the comments. That should get you down to 40 some odd lines. But you're right, I'm afraid my routine is not as short as your's. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist