Understanding the Master & Slave Roles in IIC Bus Technology

In summary, buses are used to transfer data between units and can be controlled by a single Bus Controller (Master). Slaves store unique addresses and can only respond to commands from the Master. The Master controls data flow and can also request or assign addresses to slaves. When multiple Bus Masters are present, arbitration is necessary to determine which unit communicates. Information within the message header indicates the direction of data flow and the first byte of data transfer usually contains the address of the slave unit. Only the slave with a matching address will respond to the Master's command.
  • #1
seang
184
0
Hey all;

I have to write a report on a certain bus (the bus is associated with a uC), based on a technical document. Thing is, we haven't learned much about buses yet. I understand most of it, but there's one thing I don't understand.

What is a slave and what is a master? Here's some phrases from the doc. I think If someone could explain them I'd have a lot better handle on buses and the master/slave idea in general.

"This register contains the address the IIC Bus will respond to when addressed as a slave."

"This would ultimately result in either the current bus master or the IIC Bus module losing arbitration..."

(the IIC is the name of the bus)

"IAAS — Addressed as a slave bit"

"0 = Slave receive, master writing to slave
1 = Slave transmit, master reading from slave"

"The first byte of data transfer immediately after the START signal is the slave address transmitted by the master."

"Only the slave with a calling address that matches the one transmitted by the master will respond by sending back an acknowledge bit."

Thanks.
 
Engineering news on Phys.org
  • #2
The bus is just the medium for transferring data between units. The Bus type defines the architecture and the signal types that can be used on the data wires.
Master Slave Buses use a single Bus Controller (The Master) to control what and when information is transmitted on the bus. this prevents two units talking at the same time (Data Collision).

The Bus Controller will talk to every slave unit on the bus, but only the one which matches the address in the message header will respond to the command. The Bus controller will then wait to receive the response before sending out the next command. Generally Slave units cannot transmit unless directly commanded by the Master.

"This register contains the address the IIC Bus will respond to when addressed as a slave."

The slave stores a unique address which the Master can use to talk to it. Depending on Bus type this address can be fixed or dynamic and the master can either be preprogrammed with slave addresses or request an address.

"This would ultimately result in either the current bus master or the IIC Bus module losing arbitration..."
I assume this is where you have the possiblility of multiple Bus Masters on a single Bus. A single Bus Master will controll all other devices as slaves, but under certain circumstances another Bus Master may take control of the Bus. The Bus Master is arbitrating between units to determine which unit communicates.

"IAAS — Addressed as a slave bit"

"0 = Slave receive, master writing to slave
1 = Slave transmit, master reading from slave"
This is referring to information within the message header for a serial bus or on a specific line for a parallel bus to indicate which direction data is flowing in.

"The first byte of data transfer immediately after the START signal is the slave address transmitted by the master."
If this is in a dynamically addressed system the Master is telling slaves what addresses it wants to operate on and also finding out how many slaves are on the network. Otherwise it is referring to the fact that each message frame header begins with a start of message pattern and is then followed by the address of the slave unit the message is for.

"Only the slave with a calling address that matches the one transmitted by the master will respond by sending back an acknowledge bit."
Any other slave unit will hear the message but as the address will not match it's own it will ignore the instruction.
 
  • #3


Hi there,

To understand the master and slave roles in IIC bus technology, it is important to first understand the concept of a bus. A bus is a communication pathway that allows multiple devices to communicate with each other. In the case of IIC bus, it is a serial communication bus that allows communication between a master device and multiple slave devices.

Now, let's look at the phrases from the document to understand the roles of master and slave in IIC bus technology.

- "This register contains the address the IIC Bus will respond to when addressed as a slave."

In this phrase, the slave refers to a device that receives commands or data from the master device. The slave device has a register that contains its address, and when the master device sends a command or data to that address, the slave device will respond.

- "This would ultimately result in either the current bus master or the IIC Bus module losing arbitration..."

Arbitration is the process of determining which device on the bus has the right to communicate at a given time. In IIC bus, the master device initiates communication and the slave devices respond. In this phrase, it means that if there is a conflict between two devices trying to communicate at the same time, either the current master device or the IIC bus module itself will lose the right to communicate.

- "IAAS – Addressed as a slave bit"

IAAS stands for "Addressed as a slave bit." It is a bit in the status register of the IIC bus module that indicates whether the device is being addressed as a master or a slave. If the bit is set to 0, it means the device is being addressed as a slave.

- "0 = Slave receive, master writing to slave
1 = Slave transmit, master reading from slave"

This phrase explains the different modes of communication in IIC bus. When the IAAS bit is 0, the device is in slave receive mode, meaning it is receiving data from the master device. When the IAAS bit is 1, the device is in slave transmit mode, meaning it is transmitting data to the master device.

- "The first byte of data transfer immediately after the START signal is the slave address transmitted by the master."

When the master device initiates communication, it sends a START signal and then the slave address. This phrase explains that the first byte of data after the START signal is the address of the slave device that the master device wants to communicate
 

FAQ: Understanding the Master & Slave Roles in IIC Bus Technology

What is the IIC bus technology and how does it work?

The Inter-Integrated Circuit (IIC) bus technology is a communication protocol used for connecting microcontrollers and other integrated circuits within a device. It allows for two-way communication between devices, with one acting as a master and the other as a slave. The master is responsible for initiating and controlling communication, while the slave responds to commands from the master.

What are the benefits of using the master and slave roles in IIC bus technology?

The use of master and slave roles in IIC bus technology allows for efficient communication between devices, as the master can control the timing and data transfer. It also allows for multiple slaves to be connected to a single master, reducing the number of communication lines needed. Additionally, the master can prioritize communication with different slaves, allowing for more efficient data transfer.

How do devices determine their roles as master or slave in IIC bus technology?

Devices determine their roles as master or slave through a process called arbitration. During this process, devices send a unique address over the bus, and the device with the lowest address becomes the master. The remaining devices then become slaves and respond to commands from the master.

Can the roles of master and slave be changed during the communication process?

No, the roles of master and slave cannot be changed during the communication process. Once the devices have been assigned their roles through arbitration, they will maintain those roles until the communication is complete. However, the master can communicate with different slaves during the same transmission.

Are there any limitations to using master and slave roles in IIC bus technology?

While using master and slave roles in IIC bus technology has many benefits, there are some limitations to consider. One limitation is that the number of slaves that can be connected to a single master is limited by the amount of data that can be transferred within a certain time frame. Additionally, the master must have enough processing power to handle the communication with multiple slaves.

Back
Top