Stefan.. Having walked a mile in your shoes, I have a few suggestions. Do not use the built in PWM generator. It cannot scale down far enough to provide a suitable motor PWM frequency. Use timer 0 to generate a ramp counter and generate the ramp yourself. The secondary benefit is clear in a moment. The back EMF on a DC motor is a very good indication of speed. The caveat is that when you use PWM to control the power to the motor, the voltage reading on the motor at any randomly chosen time may have nothing to do with the back EMF. Therefore, you should time your reading of the motor voltage to the point just before the on cycle on the PWM output. This way, your motor voltage has settled fairly well into the true back EMF value. Make sure that your overall period is low enough to allow this settling to occur. Best of luck. Chris Eddy Pioneer Microsystems, Inc. Stefan Sczekalla-Waldschmidt wrote: > Hi, > > I4m going to control an small-Power AC/DC Motor. > > Motor type is german-called "Reihenschlusz-Motor" which > means that rotor and field-coils are normaly connected. > > ------[]-----( O )----- > > ^Field Coil ^Rotor with brushes > > I like to controle the speed. I have the possibillity to > access the connection between field-coil and rotor. > > My idea is to generate PWM using an PIC, and measuring the > bkemf with the built in A/D. Using the bkemf to determine > the speed/load. > > The Motor Power-consumption is less then .5 Amps continous. Supply > -Voltage is rectivied AC aprox. 12 - 25 Volts, 30kHz (!). > > The Application is to regulate the speed of Model-Railroad-Locos. > > Does somebody have Ideas, Source, descriptions, suggestions, hints ? > > Kind regards, > > Stefan Sczekalla-Waldschmidt.