fix off-by-one error
increase timing to 48 MHz resolution
cleanup and more elaborate test