Download Print this page

NEX ROBOTICS Fire Bird V ATMEGA2560 Software Manual page 107

Robotic research platform
Hide thumbs Also See for Fire Bird V ATMEGA2560:

Advertisement

Bit 0 – UCPOLn: Clock Polarity
This bit is used for synchronous mode only. Write this bit to zero when asynchronous mode is
used. The UCPOLn bit sets the relationship between data output change and data input sample,
and the synchronous clock (XCKn).
UCPOLn
0
1
8.1.4 UBRRnL and UBRRnH – USART Baud Rate Registers
Initial value
0
Read / Write
R
Bit
15
ADCH
ADCL
UBRR7
Bit
7
Read / Write
R/W
Initial value
0
Baud rate calculation:
Crystal frequency: 14.7456 MHz
Required baud rate: 9600 bits per second
UBRR = (System Clock / (16 * baud rate)) – 1
= (14.7456 MHz / (16 * 9600)) – 1
= 95
= 0x5F (hex)
UBRRH = 0x00
UBRRL = 0x5F
Baud rate 2400 4800 9600 14.4k 19.2k
Table 8.6: Value of UBRR for different baud rate for 14.7456 MHz crystal
For 14.7456MHz crystal frequency, the most commonly used baud rates for asynchronous
operation can be generated by using the UBRR settings as shown in the table 8.6.
Note:
While loading values in the UBRR register load values in the UBRRH resistor first and then in
UBRRL register.
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
Transmitted Data Changed (Output
of TxDn Pin)
Rising XCKn Edge
Falling XCKn Edge
Table 8.5: UCPOLn Bit Settings
0
0
R
R
14
13
-
-
-
UBRR6
UBRR5
6
5
R/W
R/W
0
0
Fire Bird V ATMEGA2560 Software Manual
Received Data Sampled (Input on
RxDn Pin)
Falling XCKn Edge
Rising XCKn Edge
0
0
R
R/W
12
11
-
UBRR11
UBRR10
UBRR4
UBRR3
UBRR2
4
3
R/W
R/W
0
0
28.8k 38.4k 57.6k 76.8k 115.2k
0
0
R/W
R/W
R/W
10
9
UBRR9
UBRR8
UBRR1
UBRR0
2
1
R/W
R/W
R/W
0
0
0
8
0
0
107

Advertisement

loading
Need help?

Need help?

Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?

Subscribe to Our Youtube Channel