Code/C-Code/atmega.c
//Function To Initialize UART1 to communicate with dsPIC
// baud rate:9600
// char size: 8 bit
// parity: Disabled
Function To Initialize UART1 to communicate with dsPIC
baud rate:9600
char size: 8 bit
parity: Disabled
Function To Initialize UART1 to communicate with dsPIC baud rate : 9600 char size : 8 bit parity : Disabled
void uart1_init(void)
{
 	UCSR1B = 0x00; 					
 	UCSR1A = 0x00;					
	UCSR1C = 0x06;					
 	UBRR1H = 0x00; 					
	UBRR1L = 0x5F; 					
 	UCSR1B = 0x98;					
}
void uart1_init ( void ) { UCSR1B = 0x00 ; UCSR1A = 0x00 ; UCSR1C = 0x06 ; UBRR1H = 0x00 ; UBRR1L = 0x5F ; UCSR1B = 0x98 ; }
Function To Initialize UART1 to communicate with dsPIC
baud rate:9600
char size: 8 bit
parity: Disabled
Function To Initialize UART1 to communicate with dsPIC baud rate : 9600 char size : 8 bit parity : Disabled
//disable RX and TX while setting baud rate //Clearing RX and TX complete flag, baud rate divisor is 16 //8 bit data, no parity //set baud rate hi //set baud rate lo //RX interrupt enabled, TX interrupt disabled //RX and TX enabled