I think you can find more answers if you put your post in the microcontroller part of the forum, here people discussing about the analog and layout microelectronic circuit design
Refer to the L298 datasheets - they provide lots of information.
A uC can be used to generate the variable PWM signal, and also the direction control signals.
Google for these keywords and you'll get lots of examples etc.