#include "main.h" #define DEBUG #ifdef DEBUG #define MYUBRR 8 /*BAUD=115200*/ void initUSART(){ UBRR0 = (unsigned char) MYUBRR; /*enable USART write and read*/ UCSR0B |= /*(1<>4) <0x0A ){ tx('0'+((c&0xF0)>>4) ); }else{ tx('A'-0x0A+((c&0xF0)>>4)); } if( (c&0x0F)<0x0A ){ tx('0'+(c&0x0F)); }else{ tx('A'-0x0A+(c&0x0F)); } } char rx( void ){ while ( !(UCSR0A & (1<