MicroController Design
http://microcontroller.ca/reference_designs/passive_attenuator.html