SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
ARM7 LPC2148 I2C Block

             Prof. Anish Goel
Features
       Standard I2C compliant bus interfaces that may be
        configured as Master, Slave, or Master/Slave.
       Arbitration between simultaneously transmitting masters
        without corruption of serial data on the bus.
       Programmable clock to allow adjustment of I2C transfer
        rates.
       Bidirectional data transfer between masters and slaves.
       Serial clock synchronization allows devices with different
        bit rates to communicate via one serial bus.
       Serial clock synchronization can be used as a handshake
        mechanism to suspend and resume serial transfer.
       The I2C bus may be used for test and diagnostic
        purposes

    2                         LPC2148 I2C   Prof. Anish Goel
Description
       A typical I2C bus configuration is shown in Figure.
        Depending on the state of the direction bit (R/W), two
        types of data transfers are possible on the I2C bus:




    3                        LPC2148 I2C   Prof. Anish Goel
Description
• Data transfer from a master transmitter to a slave receiver.
  The first byte transmitted by the master is the slave address.
  Next follows a number of data bytes. The slave returns an
  acknowledge bit after each received byte.
• Data transfer from a slave transmitter to a master receiver.
  The first byte (the slave address) is transmitted by the
  master. The slave then returns an acknowledge bit. Next
  follows the data bytes transmitted by the slave to the master.
  The master returns an acknowledge bit after all received bytes
  other than the last byte. At the end of the last received byte, a
  “not acknowledge” is returned. The master device generates
  all of the serial clock pulses and the START and STOP
  conditions. A transfer is ended with a STOP condition or with a
  repeated START condition. Since a repeated START condition
  is also the beginning of the next serial transfer, the I2C bus will
  not be released.


 4                         LPC2148 I2C   Prof. Anish Goel
I2C operating modes
       In a given application, the I2C block may operate as a
        master, a slave, or both.
       In the slave mode, the I2C hardware looks for its own
        slave address and the general call address. If one of
        these addresses is detected, an interrupt is requested.
       If the processor wishes to become the bus master, the
        hardware waits until the bus is free before the master
        mode is entered so that a possible slave operation is not
        interrupted.
       If bus arbitration is lost in the master mode, the I2C block
        switches to the slave mode immediately and can detect
        its own slave address in the same serial transfer

    5                         LPC2148 I2C   Prof. Anish Goel
Master Transmitter mode
       In this mode data is transmitted from master to
        slave.
       The first byte transmitted contains the slave address
        of the receiving device (7 bits) and the data direction
        bit. In this mode the data direction bit (R/W) should
        be 0 which means Write.
       Data is transmitted 8 bits at a time.
        After each byte is transmitted, an acknowledge bit is
        received.
       START and STOP conditions are output to indicate
        the beginning and the end of a serial transfer.

    6                        LPC2148 I2C   Prof. Anish Goel
Format in the Master Transmitter mode




7              LPC2148 I2C   Prof. Anish Goel
Master Receiver mode
       In the master receiver mode, data is received from a
        slave transmitter.
       The transfer is initiated in the same way as in the
        master transmitter mode. When the START condition
        has been transmitted, the interrupt service routine
        must load the slave address and the data direction
        bit to the I2C Data Register (I2DAT), and then clear
        the SI bit.
       In this case, the data direction bit (R/W) should be 1
        to indicate a read.


    8                       LPC2148 I2C   Prof. Anish Goel
Format of Master Receive mode




9            LPC2148 I2C   Prof. Anish Goel
Slave Receiver mode
In the slave receiver mode, data bytes are received from a
 master transmitter.
Format of Slave Receiver mode




    10                 LPC2148 I2C   Prof. Anish Goel
Slave Transmitter mode
    The first byte is received and handled as in the slave
     receiver mode. However, in this mode, the direction bit
     will be 1, indicating a read operation.
    Serial data is transmitted via SDA while the serial clock is
     input through SCL. START and STOP conditions are
     recognized as the beginning and end of a serial transfer.
    In a given application, I2C may operate as a master and
     as a slave.
    In the slave mode, the I2C hardware looks for its own
     slave address and the general call address.
    If one of these addresses is detected, an interrupt is
     requested.

    11                     LPC2148 I2C   Prof. Anish Goel
Format of Slave Transmitter mode




12            LPC2148 I2C   Prof. Anish Goel

Weitere ähnliche Inhalte

Was ist angesagt?

8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 

Was ist angesagt? (20)

I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
 
SPI Protocol in LPC2148
SPI  Protocol in LPC2148SPI  Protocol in LPC2148
SPI Protocol in LPC2148
 
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER   INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 
Embedded c
Embedded cEmbedded c
Embedded c
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Switches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontrollerSwitches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontroller
 
8 bit microcontroller
8 bit microcontroller8 bit microcontroller
8 bit microcontroller
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 
Data types in verilog
Data types in verilogData types in verilog
Data types in verilog
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
Timers
TimersTimers
Timers
 

Andere mochten auch

Basic circuit or cad
Basic circuit or cadBasic circuit or cad
Basic circuit or cad
anishgoel
 
Llpc2148 sci
Llpc2148 sciLlpc2148 sci
Llpc2148 sci
anishgoel
 
Xilinx lca and altera flex
Xilinx lca and altera flexXilinx lca and altera flex
Xilinx lca and altera flex
anishgoel
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lecture
anishgoel
 

Andere mochten auch (20)

Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
I2C
I2CI2C
I2C
 
Basic circuit or cad
Basic circuit or cadBasic circuit or cad
Basic circuit or cad
 
8051 Microcontroller Timer
8051 Microcontroller Timer8051 Microcontroller Timer
8051 Microcontroller Timer
 
Llpc2148 sci
Llpc2148 sciLlpc2148 sci
Llpc2148 sci
 
PLD's
PLD'sPLD's
PLD's
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Embedded systems ppt iv part c
Embedded systems ppt iv   part cEmbedded systems ppt iv   part c
Embedded systems ppt iv part c
 
Xilinx lca and altera flex
Xilinx lca and altera flexXilinx lca and altera flex
Xilinx lca and altera flex
 
Gre edited
Gre editedGre edited
Gre edited
 
Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)
 
Cpld fpga
Cpld fpgaCpld fpga
Cpld fpga
 
Arm
ArmArm
Arm
 
Serial peripheral interface
Serial peripheral interfaceSerial peripheral interface
Serial peripheral interface
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
 
Robotics & Embedded Systems
Robotics & Embedded SystemsRobotics & Embedded Systems
Robotics & Embedded Systems
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lecture
 
Serial Communication Interfaces
Serial Communication InterfacesSerial Communication Interfaces
Serial Communication Interfaces
 
Serial communication in LPC2148
Serial communication in LPC2148Serial communication in LPC2148
Serial communication in LPC2148
 

Ähnlich wie Lpc2148 i2c

Application Report On Stellaris To Dac5571(I2c)
Application Report On Stellaris To Dac5571(I2c)Application Report On Stellaris To Dac5571(I2c)
Application Report On Stellaris To Dac5571(I2c)
Chiu-Hao Chen (Ted)
 

Ähnlich wie Lpc2148 i2c (20)

communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
I2C PRESENTATION.PPT
I2C PRESENTATION.PPTI2C PRESENTATION.PPT
I2C PRESENTATION.PPT
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
Implementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAImplementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGA
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
 
COM_BASIC.pptx
COM_BASIC.pptxCOM_BASIC.pptx
COM_BASIC.pptx
 
Inter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolInter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocol
 
An Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLAn Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDL
 
10_2Starting with serial_II.ppt
10_2Starting with serial_II.ppt10_2Starting with serial_II.ppt
10_2Starting with serial_II.ppt
 
I2c buses
I2c busesI2c buses
I2c buses
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
 
Application Report On Stellaris To Dac5571(I2c)
Application Report On Stellaris To Dac5571(I2c)Application Report On Stellaris To Dac5571(I2c)
Application Report On Stellaris To Dac5571(I2c)
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 
I2 c communication protocol
I2 c communication protocolI2 c communication protocol
I2 c communication protocol
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
I2C BUS
I2C BUSI2C BUS
I2C BUS
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
 

Mehr von anishgoel

Keil tutorial
Keil tutorialKeil tutorial
Keil tutorial
anishgoel
 

Mehr von anishgoel (19)

Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Learning vhdl by examples
Learning vhdl by examplesLearning vhdl by examples
Learning vhdl by examples
 
Dot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry PiDot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry Pi
 
Input interface with Raspberry pi
Input interface with Raspberry piInput interface with Raspberry pi
Input interface with Raspberry pi
 
Learning Python for Raspberry Pi
Learning Python for Raspberry PiLearning Python for Raspberry Pi
Learning Python for Raspberry Pi
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
learning vhdl by examples
learning vhdl by exampleslearning vhdl by examples
learning vhdl by examples
 
Digital System Design Basics
Digital System Design BasicsDigital System Design Basics
Digital System Design Basics
 
digital design of communication systems
digital design of communication systemsdigital design of communication systems
digital design of communication systems
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Embedded systems ppt iv part d
Embedded systems ppt iv   part dEmbedded systems ppt iv   part d
Embedded systems ppt iv part d
 
Embedded systems ppt iv part b
Embedded systems ppt iv   part bEmbedded systems ppt iv   part b
Embedded systems ppt iv part b
 
Embedded systems ppt ii
Embedded systems ppt iiEmbedded systems ppt ii
Embedded systems ppt ii
 
Embedded systems ppt iii
Embedded systems ppt iiiEmbedded systems ppt iii
Embedded systems ppt iii
 
Embedded systems ppt iv part a
Embedded systems ppt iv   part aEmbedded systems ppt iv   part a
Embedded systems ppt iv part a
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
Nios2 and ip core
Nios2 and ip coreNios2 and ip core
Nios2 and ip core
 
Keil tutorial
Keil tutorialKeil tutorial
Keil tutorial
 
ESD Lab1
ESD Lab1ESD Lab1
ESD Lab1
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

Lpc2148 i2c

  • 1. ARM7 LPC2148 I2C Block Prof. Anish Goel
  • 2. Features  Standard I2C compliant bus interfaces that may be configured as Master, Slave, or Master/Slave.  Arbitration between simultaneously transmitting masters without corruption of serial data on the bus.  Programmable clock to allow adjustment of I2C transfer rates.  Bidirectional data transfer between masters and slaves.  Serial clock synchronization allows devices with different bit rates to communicate via one serial bus.  Serial clock synchronization can be used as a handshake mechanism to suspend and resume serial transfer.  The I2C bus may be used for test and diagnostic purposes 2 LPC2148 I2C Prof. Anish Goel
  • 3. Description  A typical I2C bus configuration is shown in Figure. Depending on the state of the direction bit (R/W), two types of data transfers are possible on the I2C bus: 3 LPC2148 I2C Prof. Anish Goel
  • 4. Description • Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the master is the slave address. Next follows a number of data bytes. The slave returns an acknowledge bit after each received byte. • Data transfer from a slave transmitter to a master receiver. The first byte (the slave address) is transmitted by the master. The slave then returns an acknowledge bit. Next follows the data bytes transmitted by the slave to the master. The master returns an acknowledge bit after all received bytes other than the last byte. At the end of the last received byte, a “not acknowledge” is returned. The master device generates all of the serial clock pulses and the START and STOP conditions. A transfer is ended with a STOP condition or with a repeated START condition. Since a repeated START condition is also the beginning of the next serial transfer, the I2C bus will not be released. 4 LPC2148 I2C Prof. Anish Goel
  • 5. I2C operating modes  In a given application, the I2C block may operate as a master, a slave, or both.  In the slave mode, the I2C hardware looks for its own slave address and the general call address. If one of these addresses is detected, an interrupt is requested.  If the processor wishes to become the bus master, the hardware waits until the bus is free before the master mode is entered so that a possible slave operation is not interrupted.  If bus arbitration is lost in the master mode, the I2C block switches to the slave mode immediately and can detect its own slave address in the same serial transfer 5 LPC2148 I2C Prof. Anish Goel
  • 6. Master Transmitter mode  In this mode data is transmitted from master to slave.  The first byte transmitted contains the slave address of the receiving device (7 bits) and the data direction bit. In this mode the data direction bit (R/W) should be 0 which means Write.  Data is transmitted 8 bits at a time.  After each byte is transmitted, an acknowledge bit is received.  START and STOP conditions are output to indicate the beginning and the end of a serial transfer. 6 LPC2148 I2C Prof. Anish Goel
  • 7. Format in the Master Transmitter mode 7 LPC2148 I2C Prof. Anish Goel
  • 8. Master Receiver mode  In the master receiver mode, data is received from a slave transmitter.  The transfer is initiated in the same way as in the master transmitter mode. When the START condition has been transmitted, the interrupt service routine must load the slave address and the data direction bit to the I2C Data Register (I2DAT), and then clear the SI bit.  In this case, the data direction bit (R/W) should be 1 to indicate a read. 8 LPC2148 I2C Prof. Anish Goel
  • 9. Format of Master Receive mode 9 LPC2148 I2C Prof. Anish Goel
  • 10. Slave Receiver mode In the slave receiver mode, data bytes are received from a master transmitter. Format of Slave Receiver mode 10 LPC2148 I2C Prof. Anish Goel
  • 11. Slave Transmitter mode  The first byte is received and handled as in the slave receiver mode. However, in this mode, the direction bit will be 1, indicating a read operation.  Serial data is transmitted via SDA while the serial clock is input through SCL. START and STOP conditions are recognized as the beginning and end of a serial transfer.  In a given application, I2C may operate as a master and as a slave.  In the slave mode, the I2C hardware looks for its own slave address and the general call address.  If one of these addresses is detected, an interrupt is requested. 11 LPC2148 I2C Prof. Anish Goel
  • 12. Format of Slave Transmitter mode 12 LPC2148 I2C Prof. Anish Goel