tried xc8 sprintf. Breaks mainloop. tried my old poor mans implementation of sprintf, also seems to break it. Am now using uart_dump_uint16_t to send numbers over uart. This works fine. Need to work out where the timing difference (what i expect to be 1 sec using systimer is 0.7 according to arduino).