#define F_CPU 20000000L #define FOSC 20000000UL //system clock speed #define BAUD 9600UL #define MYUBRR FOSC/16/(BAUD-1) #include #include void USART_init(unsigned int ubrr); void USART_Transmit(unsigned char data); unsigned char USART_Receive(void); int main(void) { USART_init(MYUBRR); while(1) { int i; for(i=0x30; i<0x3A; i++) { USART_Transmit(i); _delay_ms(20); } } return(0); } void USART_init(unsigned int ubrr) { //set baud rate UBRRH = (unsigned char)(ubrr>>8); UBRRL = (unsigned char)ubrr; //Enable receiver and transmitter UCSRB = (1< won't work as designed" ./fshit_IMU.c: In function ‘USART_init’: ./fshit_IMU.c:32: error: ‘UBRRH’ undeclared (first use in this function) ./fshit_IMU.c:32: error: (Each undeclared identifier is reported only once ./fshit_IMU.c:32: error: for each function it appears in.) ./fshit_IMU.c:33: error: ‘UBRRL’ undeclared (first use in this function) ./fshit_IMU.c:35: error: ‘UCSRB’ undeclared (first use in this function) ./fshit_IMU.c:35: error: ‘RXEN’ undeclared (first use in this function) ./fshit_IMU.c:35: error: ‘TXEN’ undeclared (first use in this function) ./fshit_IMU.c:37: error: ‘UCSRC’ undeclared (first use in this function) ./fshit_IMU.c:37: error: ‘URSEL’ undeclared (first use in this function) ./fshit_IMU.c:37: error: ‘UCSZ1’ undeclared (first use in this function) ./fshit_IMU.c:37: error: ‘UCSZ0’ undeclared (first use in this function) ./fshit_IMU.c: In function ‘USART_Transmit’: ./fshit_IMU.c:43: error: ‘UCSRA’ undeclared (first use in this function) ./fshit_IMU.c:43: error: ‘UDRE’ undeclared (first use in this function) ./fshit_IMU.c:45: error: ‘UDR’ undeclared (first use in this function) ./fshit_IMU.c: In function ‘USART_Receive’: ./fshit_IMU.c:50: error: ‘UCSRA’ undeclared (first use in this function) ./fshit_IMU.c:50: error: ‘RXC’ undeclared (first use in this function) ./fshit_IMU.c:52: error: ‘UDR’ undeclared (first use in this function)