Hi all! I am trying to implement control loops with the pwm output of an 16C73. As I am not an engineer, I don't have the theoretical background to do it properly myself. The following two projects are on my mind: 1. A more or less stabile adjustable output voltage 0..4V that can source a current of 0..1A. I thought of the following schematic: ---------------+ | feedback A/D input +------------------------------------+ | | | +5V | 16C73 | / | | +-----+ |< | PWM output +------+ R +-----| PNP | | +-----+ |\ | ---------------+ \ L | ----UUUUUUU----+------> _|_ ___ C output | GND--+------> 2. A regulation of the RPM of a small dc motor. I thought of using the pwm feature of one ccp module to generate a pwm signal that drives the motor (buffered with a transistor) and use the capture feature of the other ccp module to measure the RPM with some kind of optical sensor. In both cases I would like to have a resolution of about 6 bits if possible. The changes in voltage and RPM won't be faster than 1s for 0%-100% or 100%->0%. I guess that somebody has done something similar already. I would appretiate any ideas/corrections/code fracments/schematics. -- Stefan Bormann s.bormann@tu-bs.de http://www.stud.uni-hannover.de/~toci/stefan_d.htm