Week 11. Output devices! I now milled and used my design from last week, developed from Hello Echo, that I didn't use last week. H-bridge is again designed on another PCB:

hbridgeboard

I also draw a board to drive a P-fet and added a button to control DC-motor speed on steps. I didn't mill and test it though.

fetdriver

It's not what I did, it's how I did it! I copy pasted Neils code to Atmel Studio 6.2, added a definition for F_CPU, build the solution, added AVRDude to the tool folder and configured external tool to program the board straight from Atmel Studio using FabISP-programmer! Generic drivers for USB were already installed on my computer. Debugging is now easy due the possibility to debug with the simulator and flash the debugged code straight from the program. I call this combination Fabmel Studio!

fabmelstudio

Output of one PWM is shown in oscilloscope:

pwmoscilloscope

Blue and yellow curves are the motor driver's outputs. The red one is the difference of those calculated by oscilloscopes math function. We have power!

pwmdiff

Final setup! I forgot to connect one pin to ground as In Neils version. So I soldered a small jump wire. Even if it might not be necessary. The motor is running back and forth, slower and faster.

motorsetup