with Arduino Board - Serial atmega168 running at 16 mhz. what are the possible baudrate options are there to choose with serial.begin(); can i use 300 baud ? and also 9600 baud with 16mhz xtal.
an i use 300 baud ? and also 9600 baud
Yes that is why the crystal was chosen to be 16MHz so as to get accurately a lot of baud rates.
many thanks Grumpy_Mike for ur reply. but when i see this site http://www.wormfood.net/avrbaudcalc.php i found that for 16mhz xtal and 300 bps UBRR is out of range . if it is like this will it functions at this low baud rate
That site shows a note that says:-
This page was originally written when there was only one UBRR register, but newer AVR models have 2 UBRR registers, so some of the lower values that show out of range, are really in range. I will update this page some time in the future.
So, for 300 baud: first make sure that the register that halves the clock cycle requirement is NOT set to high (I think serial.begin() does this). (16000000/(300*16))-1=3332. So in binary, 110100000100 So UBRRL=0b100 and UBRRH=0b1101. I think.