This is an extension of Experiment No. 8 (Click Here). The PWM output is here connected to power a DC motor through a NPN driving transistor. The motor driving circuit is built in a breadboard, as shown below. The circuit is pretty straight forward, the PWM output from PIC pin drives the BC547 transistor ON and OFF, and the current to drive the motor is provided by the collector current in the transistor. The diode is for back EMF protection. I am using a small 6V DC motor from an old cassette player. For motors that require more current to drive, a darlington transistor pair or high power transistor is recommended.