make put_uint print '0' when value = 0
remove unused illegal_instruction declaration
improve clock frequency detection

Instead of using the UART transmission as a reference,
use the AVS0 timer.
increase stack space