#include #include #include #include #define F_CPU 11059200UL #define UART_BAUD_RATE 9600 #define BAUD_PRESCALE (((F_CPU / (UART_BAUD_RATE * 16UL))) - 1) #include //Needed for sleep_mode #include void InitWatchdog(); //initialize watchdog void GoToSleep(); void SendByte1(char byte); void SendByte2(char byte); int main() { UBRR0H = (BAUD_PRESCALE >> 8); // Load upper 8-bits of the baud rate value into the hig UBRR0L = BAUD_PRESCALE; // Load lower 8-bits of the baud rate value into the low byte o UCSR0B= (1 << RXEN0) | (1 << TXEN0); // Turn on the transmission and reception UCSR0C = (1 << USBS0) | (1 << UCSZ00) | (1 << UCSZ01); // Use 2 stop bits, 8-bit character size, //UCSR0C = (1 << UCSZ00) | (1 << UCSZ01); // Use 1 stop bit, 8-bit character size, //UCSR0C |= (1 << UMSEL01) ; // Synchronous USART SendByte1('A') ; InitWatchdog(); set_sleep_mode(SLEEP_MODE_PWR_DOWN); // define sleep as 'deep sleep mode' while(1) { SendByte1('B'); GoToSleep(); } return 1; } //=========================================================================== void GoToSleep() { WDTCSR |= (1< system reset mode WDTCSR |= (1<