An AHB system is made of masters slaves and interconnections. A general approach to include all possible "muxed" implementation of multi layered AHB systems and arbitrated AHB ones can be thought as an acyclic graph where every source node is a master, every destination node is a slave and every internal node is an arbiter there must
be one and only one arc exiting a master and one or more entering a slave (single slave verus multi-slave or arbitrated slave) an arbiter can have as many input and output connections as needed. A bridge is a special node that collapses one or more slave nodes and a master node in a new "complex" node.
Portable, battery-powered operation of electronic apparatushas become increasingly desirable. Medical, remotedata acquisition, power monitoring and other applicationsare good candidates for battery operation. In some circumstances,due to space, power or reliability considerations,it is preferable to operate the circuitry from a single 1.5Vcell. Unfortunately, a 1.5V supply eliminates almost alllinear ICs as design candidates. In fact, the LM10 opamp-reference and the LT®1017/LT1018 comparators arethe only IC gain blocks fully specifi ed for 1.5V operation.Further complications are presented by the 600mV dropof silicon transistors and diodes. This limitation consumesa substantial portion of available supply range, makingcircuit design diffi cult. Additionally, any circuit designedfor 1.5V operation must function at end-of-life batteryvoltage, typically 1.3V. (See Box Section, “Componentsfor 1.5V Operation.”)
Portable, battery-powered operation of electronic apparatushas become increasingly desirable. Medical, remotedata acquisition, power monitoring and other applicationsare good candidates for batteryoperation. In some circumstances,due to space, power or reliability considerations,it is preferable to operate the circuitry from a single 1.5Vcell. Unfortunately, a 1.5V supply eliminates almost alllinear ICs as design candidates. In fact, the LM10 opamp-reference and the LT®1017/LT1018 comparators arethe only IC gain blocks fully specifi ed for 1.5V operation.Further complications are presented by the 600mV dropof silicon transistors and diodes. This limitation consumesa substantial portion of available supply range, makingcircuit design diffi cult. Additionally, any circuit designedfor 1.5V operation mustfunction at end-of-life batteryvoltage, typically 1.3V. (See Box Section, “Componentsfor 1.5V Operation.”)
The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus master, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus Master. That application note includes a programmingexample, demonstrating a bus-master code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus master.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a master or a slave,but not both. Switching between master and slave roles in amultimaster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a master initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmaster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themaster (or masters) on the bus which should (hopefully) try toresolve the situation.
This code implements the basic functions for an I2C slave device using the SSP module. All I2C functions are handled in an ISR. Bytes written to the slave are stored in a buffer. After a number of bytes have been written, the master device can then read the bytes back from the buffer.