ATMEGA161-8PI Atmel, ATMEGA161-8PI Datasheet - Page 73

IC AVR MCU 16K 8MHZ IND 40-DIP

ATMEGA161-8PI

Manufacturer Part Number
ATMEGA161-8PI
Description
IC AVR MCU 16K 8MHZ IND 40-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA161-8PI

Core Processor
AVR
Core Size
8-Bit
Speed
8MHz
Connectivity
SPI, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
35
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
1K x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Data Converters
-
Other names
ATMEGA1618PI
Multi-processor
Communication Mode
UART Control
UART0 I/O Data Register –
UDR0
UART1 I/O Data Register –
UDR1
UART0 Control and Status
Registers – UCSR0A
1228D–AVR–02/07
The Multi-processor Communication mode enables several Slave MCUs to receive data
from a master MCU. This is done by first decoding an address byte to find out which
MCU has been addressed. If a particular Slave MCU has been addressed, it will receive
the following data bytes as normal, while the other Slave MCUs will ignore the data
bytes until another address byte is received.
For an MCU to act as a master MCU, it should enter 9-bit transmission mode (CHR9n in
UCSRnB set). The ninth bit must be one to indicate that an address byte is being trans-
mitted, and zero to indicate that a data byte is being transmitted.
For the Slave MCUs, the mechanism appears slightly different for 8-bit and 9-bit recep-
tion mode. In 8-bit reception mode (CHR9n in UCSRnB cleared), the stop bit is one for
an address byte and zero for a data byte. In 9-bit reception mode (CHR9n in UCSRnB
set), the ninth bit is one for an address byte and zero for a data byte, whereas the stop
bit is always high.
The following procedure should be used to exchange data in Multi-processor Communi-
cation mode:
1. All Slave MCUs are in Multi-processor Communication mode (MPCMn in UCS-
2. The master MCU sends an address byte and all Slaves receive and read this
3. Each Slave MCU reads the UDRn Register and determines if it has been
4. For each received data byte, the receiving MCU will set the Receive Complete
5. After the last byte has been transferred, the process repeats from step 2.
The UDRn Register is actually two physically separate registers sharing the same I/O
address. When writing to the register, the UART Transmit Data Register is written.
When reading from UDRn, the UART Receive Data Register is read.
Bit
$0C ($2C)
Read/Write
Initial Value
Bit
$03 ($23)
Read/Write
Initial Value
Bit
$0B ($2B)
Read/Write
Initial Value
RnA is set).
byte. In the Slave MCUs, the RXCn Flag in UCSRnA will be set as normal.
selected. If so, it clears the MPCMn bit in UCSRnA; otherwise, it waits for the
next address byte.
Flag (RXCn in UCSRnA). In 8-bit mode, the receiving MCU will also generate a
framing error (FEn in UCSRnA set), since the stop bit is zero. The other Slave
MCUs, which still have the MPCMn bit set, will ignore the data byte. In this case,
the UDRn Register and the RXCn, FEn, or Flags will not be affected.
RXC0
MSB
MSB
R/W
R/W
R
7
0
7
0
7
0
TXC0
R/W
R/W
R/W
6
0
6
0
6
0
UDRE0
R/W
R/W
R
5
1
5
0
5
0
FE0
R/W
R/W
R
4
0
4
0
4
0
OR0
R/W
R/W
R
3
0
3
0
3
0
R/W
R/W
R
2
0
2
0
2
0
ATmega161(L)
U2X0
R/W
R/W
R/W
1
0
1
0
1
0
MPCM0
R/W
LSB
R/W
LSB
R/W
0
0
0
0
0
0
UCSR0A
UDR0
UDR1
73

Related parts for ATMEGA161-8PI