>I would like to use a 16F87x for this, and in >assembly (or if someone could help me find a decent >compiler for some other language, that would be simpler). >The 16F877 already has a hardware PWM, and I plan to >use that, but I'm confused on how to make variable >frequency and variable pulsewidth. This sounds to me like it would be an ideal project for something like a dsPIC, for which there is a free C compiler available from Microchip. It also has hardware PWM. Another possibility would be an 18F family chip, AFAIK these all come with hardware PWM, and the Microchip C compiler has a demo version which is easily kept working for the life of a project by re-installing. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu