Hardware for digitally controlled scanned probe microscopes