User Manual

189
ATmega48A/PA/88A/PA/168A/PA/328/P [DATASHEET]
8271E–AVR–07/2012
3. Each Slave MCU reads the UDRn Register and determines if it has been selected. If so, it clears the
MPCMn bit in UCSRnA, otherwise it waits for the next address byte and keeps the MPCMn setting.
4. The addressed MCU will receive all data frames until a new address frame is received. The other Slave
MCUs, which still have the MPCMn bit set, will ignore the data frames.
5. When the last data frame is received by the addressed MCU, the addressed MCU sets the MPCMn bit and
waits for a new address frame from master. The process then repeats from 2.
Using any of the 5- to 8-bit character frame formats is possible, but impractical since the Receiver must change
between using n and n+1 character frame formats. This makes full-duplex operation difficult since the Transmitter
and Receiver uses the same character size setting. If 5- to 8-bit character frames are used, the Transmitter must
be set to use two stop bit (USBSn = 1) since the first stop bit is used for indicating the frame type.
Do not use Read-Modify-Write instructions (SBI and CBI) to set or clear the MPCMn bit. The MPCMn bit shares the
same I/O location as the TXCn Flag and this might accidentally be cleared when using SBI or CBI instructions.
20.10 Examples of Baud Rate Setting
For standard crystal and resonator frequencies, the most commonly used baud rates for asynchronous operation
can be generated by using the UBRRn settings in Table 20-4. UBRRn values which yield an actual baud rate differ-
ing less than 0.5% from the target baud rate, are bold in the table. Higher error ratings are acceptable, but the
Receiver will have less noise resistance when the error ratings are high, especially for large serial frames (see
”Asynchronous Operational Range” on page 187). The error values are calculated using the following equation:
Error[%]
BaudRate
Closest Match
BaudRate
-------------------------------------------------- 1


100%=