Function to Setup Serial Communication i.e UART or USART in ATmega16.
integer, from 0 to 2
Enter one of the following available baudrates (2400 , 4800 , 9600 , 14400 , 19200 , 28800 , 38400 , 57600 , 768000 , 115200 , 230400 , 250000 , 1000000)
integer, (0 for one stopbit) or (1 for two stopbits)
integer, from 0 to 2
This function Setup the UART or USART for Serial Communicaion between ATmega16 and different micro controllers or between ATmega16 and Computer.
mode can take values:
0 for Asynchronous Normal mode
1 for Asynchronous Double Speed mode
2 for Synchronous mode
parity can take values:
0 for parity disabled
1 for even parity
2 for odd parity
This is curretly dummy function. It provides no functionality but is required for providing support for generating C code for AVR.
AVRUARTSetup(0,9600,0,0); //This function will enable UART Communication for ATmega16 with 9600 as baudrate,one stop bit and parity disabled |