NXP I2c
NXP I2c
I2C-bus
30 July, 2008
I2C - Contents
I2C protocol
I2C functions
I2C bus enablers
I2C demo boards
I2C support information
2
I2C - Protocol
IIC - Inter-Integrated Circuit
Logic
This means:
• Decreased number of wires (reduced PCB area)
• Reduced number of chip pins
• Remove glue logic
I2C-bus • Clip many devices on to the bus
• Modular design: Time-to-Market
VCC
Invented by NXP!
(Philips Semiconductors)
I2C-bus developed in the late 1970’s for Philips consumer products (e.g. TVs)
Worldwide industry standard and used by all major IC manufacturers
3
I2C - Protocol
Hardware architecture
VDD
Pull up resistors
SDA
SCL
Device 1 Device 2
2 wire bus:
– SDA: Serial Data Line
– SCL: Serial Clock Line
Open-drain or open-collector output stages: wired-AND function
4
I2C - Protocol
Hardware architecture (2)
Master2 Slave2
VDD
SDA
SCL
Master1 Slave1
Multiple master
Multiple slave
Bi-directional
– Master-transmitter
– Master-receiver
– Slave-transmitter
– Slave-receiver
Data collision is taken care off
5
I2C - Protocol
Addressing / device selection
Each device is addressed individually by software
New devices or functions can be easily “clipped" on to an existing bus!
112 different addresses max with the 7-bit format (others reserved); additional 1024 with
10-bit format
Address allocation coordinated by the I2C-bus committee
Programmable pins means that several of the same devices can share the same bus
Unique address per device: fully fixed or with a programmable part through hardware
pin's)
10-bit format use a 2 byte message: 1111 0A9A8R/W + A7A6A5A4A3A2A1A0
VDD
SDA
SCL
Master1 Slave1
Address register Fixed
A6 A5 A4 A3 A2 A1 A0
VDD 0 0 1 1 1 0 0 Hardware
Programmable
6
I2C - Protocol
Master
Communication
Slave
Communication must start with: START condition
Start bit is always followed by slave address Master or Slave
Slave address is followed by a READ or NOT-WRITE bit
The receiving device (either master or slave) must send an ACKNOWLEDGE bit
Communication must start with: STOP condition
SLAVE
START R/W ACK DATA[8] ACK STOP
ADDRESS[7]
Example:
Transmit (0 = Write)
SLAVE
START 0 ACK DATA[8] ACK DATA[8] ACK STOP
ADDRESS[7]
Receive (1 = Read)
SLAVE
START 1 ACK DATA[8] ACK DATA[8] ACK STOP
ADDRESS[7]
7
I2C - Protocol
START & STOP conditions
Start condition - a HIGH to LOW transition on the SDA line while SCL is HIGH
Stop condition - a LOW to HIGH transition on the SDA line while SCL is HIGH
8
I2C - Protocol
Bit transfer
9
I2C - Protocol
Data transfer
10
I2C - Protocol
Acknowledge / NOT-Acknowledge
I2C specification: Data transfer with acknowledge is obligatory. The receiver must pull
down the SDA line during the acknowledge clock pulse so that it remains stable LOW
during the HIGH period of this clock pulse.
Scenarios with a NOT-acknowledge (NACK) (SDA staying HIGH):
1. A receiver with the address is not present in the I2C bus.
2. The receiver is performing real-time tasks and it cannot process the received I2C
information.
3. The receiver is the master and wants to take control of SDA line again in order to
generate a STOP command. The slave transmitter MUST then release the SDA
line when it sees the NACK so the master can send the STOP command.
11
I2C - Protocol
Arbitration procedure
VDD Two or more masters may generate a START
condition at the same time
SDA
Arbitration is done on SDA while SCL is HIGH -
Slaves are not involved
DATA1 DATA2
SDA SDA
Master 1 Master 2
12
I2C - Protocol
Clock synchronization during the arbitration procedure
VDD
Internal counters of masters count the LOW
SCL and HIGH times (TL1, TH1) and (TL2, TH2)
CLK1 CLK2
SCL SCL
Master 1 Master 2
TL1 TH1
TL TH
13
I2C - Protocol
Modes
14
I2C - Protocol
Modes: Electrical specification
Fast Mode Plus
Standard Mode Fast Mode High Speed Mode
(FM+)
trise
Vcc
VIH 0.7 * VDD
Vbus
(V)
15
I2C - Protocol
Electrical: VDD / How to calculate the pull-up resistor values
16
I2C - Protocol
Summary
17
I2C - Protocol
Demoboard I2C 2005-1: software & hardware setup
18
I2C - Protocol
Demoboard I2C 2005-1: Win-I2CUSB LiteGUI Overview
Device selection: only devices in
the board can be selected
Expert Mode allows to
write customized I2C
commands limited to
8 commands with 8
bytes of data for each
19
I2C - Protocol
Demoboard I2C 2005-1: Expert Mode
20
I2C - Protocol
Demoboard I2C 2005-1: Demonstration Board Block Diagram
21
I2C - Protocol
Demoboard I2C 2005-1: PCF8574 schematic
22
I2C - Protocol
Demoboard I2C 2005-1: PCF8574 on the board
PCF8574
23
I2C - Protocol
Demoboard I2C 2005-1: Exercise: Use switch to generate an I2C message
24
I2C - Protocol
Demoboard I2C 2005-1: Exercise: solution
The following sequence should be followed:
– Send Start condition
– Send PCF8574 address with LSB= ‘0’ for Write: 0100 0000b
– Send data byte 0xFA: 1111 1010b
– Send Stop condition
– Don’t forget the acknowledge clock pulses
25
I2C - Building blocks
26
I2C - AD / DA Converters
27
I2C - AD / DA Converters 8. Read out of sensors
Application
9. Audio distribution
1. Read out of
grounded voltages
4. Battery monitoring
/ Floating voltages
28
I2C - AD / DA Converters
Product overview
AD and DA converters
2
I C Bus
DA converters
I2C Bus DAC
DAC
Analog-out
DAC
29
I2C - AD / DA Converters
AD and DA converters
PCF8591
8-bit resolution
Simply add the capability to:
– 4 analog inputs
– One analog output
Sampling rate: 11 kHz
Can support a large variety of input configurations
PCA9691
See PCF8591 +
Fast Mode Plus (FM+) device:
– High sampling rate: 110 kHz
– Allows audio signal distribution
– Fast control loops without occupying the bus continuously
30
I2C - AD / DA Converters
DA converter
TDA8444
Eight DACs with 6-bit resolution
Adjustable common output swing
Push-pull outputs
Outputs short-circuit protected
Three programmable slave address bits
Large supply voltage range
Low temperature coefficient
31
I2C - GPIOs: General Purpose I/O Expanders
32
I2C - GPIOs: General Purpose I/O Expanders
Application 1. LED driver
VDD
2. Read interrupts
I2C Bus
µC
3. Give subsystem resets
4. Control devices
33
I2C - GPIOs: General Purpose I/O Expanders
Application: making LED displays
VCC
µC
34
I2C - GPIOs: General Purpose I/O Expanders
Intermezzo: Output stages
Advantages
VDD independent
25 mA sink current
Steep HIGH-LOW transition
Switch from output to input: only write I/O with “1” to be used as an input
Disadvantages
Slow LOW-HIGH transition (depends on the load and on Rpullup)
35
I2C - GPIOs: General Purpose I/O Expanders
Intermezzo: Output stages (2)
Totem Pole IO
VDD input data
~ 10 mA Rpullup*
output data driver IO
~ 25 mA *: some types have
pull up resistors
Advantages
25 mA sink current, 10 mA source current
Steep HIGH-LOW transition
Steep LOW-HIGH transition
Disadvantages
VDD dependent
Switch from output to input: program the configuration register accordingly (extra programming
involved to use the I/O as input)
36
I2C - GPIOs: General Purpose I/O Expanders
Intermezzo: Output stages (3)
Strong PMOS on Quasi Bidirectional IO VDD
ONLY 2 osc. clock
periods ~ 100 μA
input data
driver
output data IO
~ 25 mA
Advantages
25 mA sink current; strong sourcing current only during low-high transition; weak sourcing in
steady state
Steep HIGH-LOW-transition Steep LOW-HIGH transition
Switch from output to input: only write I/O with “1” to be used as an input
Usage at higher speeds
Usage at heavily loaded outputs
Disadvantages
VDD dependent
37
I2C - GPIOs: General Purpose I/O Expanders
Product overview
GPIO IO0
GPIO IO0
2
I C Bus 2
I C Bus Quasi-
Totem-pole IO1 IO1
bidirectional
output
output
stages
IOn stages IOn
GPIO IO0
I2C Bus Quasi-
bidirectional IO1
Differentiating GPIO features output
EEPROM stages IOn
Active-LOW Interrupt output
Active-LOW Reset input
Programmable I2C address pins GPIO IO0
I2C Bus Open drain IO1
Low power consumption EEPROM output
stages
Additional: EEPROM IOn
– EEPROM
– DIP switch MUX
MUX_IN MUX_OUT
38
I2C - GPIOs: General Purpose I/O Expanders
PCF8574(A) and PCF8575(C) or PCA type (low cost)
39
I2C - GPIOs: General Purpose I/O Expanders
PCA9698
40
I2C - GPIOs: General Purpose I/O Expanders
Product summary
Frequency [MHz]
Resistor/ current
Frequency [kHz]
Interrupt Output
Internal Pull-Up
2 kbit EEPROM
Hardware reset
Vcc Range (V)
5 V Tolerance
Quasi Output
# of Outputs
Type nr.
SPI Max
I2C Max
source
OE
PCA9500 8 3 3 2.5-3.6 3 400 3
PCA9501 8 3 3 2.5-3.6 3 400 3 3
PCA9558 8 Open Drain 2.3-5.5 400 3 3
PCA9505/06 40 Open Drain 3 2.3-5.5 3 400 3 3 3
PCF8574(A) 8 3 3 2.5-6.0 3 100 3
PCA8574(A)* 8 3 3 2.3-5.5 3 400 3
PCF8575 16 3 3 2.5-5.5 3 400 3
PCF8575C 16 Open Drain 4.5-5.5 3 400 3
PCA9670* 8 3 3 2.3-5.5 3 1000 3
PCA9672* 8 3 3 2.3-5.5 3 1000 3 3
PCA9674(A)* 8 3 3 2.3-5.5 3 1000 3
PCA9671* 16 3 3 2.3-5.5 3 1000 3
PCA9673* 16 3 3 2.3-5.5 3 1000 3 3
PCA9675* 16 3 3 2.3-5.5 3 1000 3
PCA8575* 16 3 3 2.3-5.5 3 400 3
*: GPIOs Recommended for LED Applications
41
I2C - GPIOs: General Purpose I/O Expanders
Product summary (2)
Frequency [MHz]
Push-pull Output
Resistor/ current
Frequency [kHz]
Interrupt Output
Internal Pull-Up
Hardware reset
Vcc Range (V)
5 V Tolerance
Quasi Output
# of Outputs
SPI Max
Type nr.
I2C Max
source
OE
PCA9502 8 3 2.3-3.6 3 400 15 3 3
PCA9505* 40 3 3 2.3-5.5 3 400 3 3 3
PCA9506* 40 3 2.3-5.5 3 400 3 3 3
PCA9534 8 3 2.3-5.5 3 400 3
PCA9535 16 3 2.3-5.5 3 400 3
PCA9536* 4 3 3 2.3-5.5 3 400
PCA9537* 4 3 2.3-5.5 3 400 3 3
PCA9538* 8 3 2.3-5.5 3 400 3 3
PCA9539* 16 3 2.3-5.5 3 400 3 3
PCA9554(A) 8 3 3 2.3-5.5 3 400 3
PCA9555 16 3 3 2.3-5.5 3 400 3
PCA9557* 8 3 2.3-5.5 3 400 3
PCA9698* 40 Open Drain 3 2.3-5.5 3 1000 3 3 3
*: GPIOs Recommended for LED Applications
42
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCF8574 schematic
43
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCF8574 GUI
Checkboxes (read-only)
represent state of port pins
Checked = High
Unchecked = Low
P6 = switch connected
to ground
P7 = switch to Vcc
44
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: Exercise: Understanding quasi-bidirectional outputs
45
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCA9536 schematic
Unswitched 5 V
Switched 3.3 V
PCA9536:
No programmable address pin
I2C address = 0x82
46
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCA9538 schematic
47
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCA9538 GUI
Output register programming
I2C address: the logic state of the pins
PCA9536 = 0x82 programmed as inputs
PCA9538 = 0xE4 Auto Write Feature
Polarity register-
allowing to invert or
not the logic values Input register
read from the pins reading the IOs
logic states
Configuration register-
programming IOs as
inputs or output
48
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: PCA9536, PCA9538 on the board
RESET PCA9538
PCF8574
PCA9536
49
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: Exercise A: PCA9536
50
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: Exercise B: PCA9538
Write the following I2C sequence (Red) using the Expert Mode
1. Power sequence the board Æ Board OFF then ON
2. Program PCA9538 I/O0 to I/O4 as output (and be sure that I/O5 to I/O7 are configured
as inputs)
3. Switch ON PCA9538 I/O0 only and wait 0.5 s
4. Switch ON PCA9538 I/O1 only and wait 0.5 s
5. Switch ON PCA9538 I/O2 only and wait 0.5 s
6. Switch ON PCA9538 I/O3 only and wait 0.5 s
7. Switch ON PCA9538 I/O4 only and wait 0.5 s
Execute it in loop
51
I2C - GPIOs: General Purpose I/O Expanders
Demoboard I2C 2005-1: Exercise B: PCA9538; solution
52
I2C - LED Drivers, Blinkers and Dimmers
53
I2C - LED Drivers, Blinkers and Dimmers
Intermezzo: Using PWM for color mixing in RGB LED
ONred
Voltage on RED LED driver
<Iblue>
ONgreen
+
LED Voltage on GREEN LED driver
Driver
Voltage <Iblue>
(V)
54
I2C - LED Blinkers, Dimmers and Drivers
Controllability via I2C; color mixing, brightness, blinking
PCA963x PCA963x
VCC VCC
I²C
Bus Expander,
Hub or Repeater
I2C bus
PCA963x PCA963x
VCC
8 I²C
I²C Bus
µC Controllers
Bus Expander,
Hub or Repeater
I2C bus
55
I2C - LED Drivers, Blinkers and Dimmers
Product overview
2 slow PWMs
LED Blinkers
One wire bus
Programmed
sequence
56
I2C - LED Drivers, Blinkers and Dimmers
PCA955x - Blinkers / PCA953x - Dimmers
PCA955x PCA953x
PWM 1 PWM 1
drivers
drivers
PWM 2 PWM 2
57
I2C - LED Drivers, Blinkers and Dimmers
PCA963x - RGBA Dimmer / Blinker / Color mixing
PCA963x
4/8/16 channel-LED drivers
– On / Off PWM 1
– Individual PWM control PWM 2
drivers
– Group PWM Control global
PWM
Output Structure
– 5 V tolerant Outputs
PWM n
– Programmable totem-pole / open drain
– 10 mA source, 25 mA sink capability 25 MHz osc
OE
/OE input pin allows hardware dimming / blinking sub1 addr sub2 addr
addr
Enables groups of devices to be addressed at sub3 addr group addr
the same time
– 1 Group-Call Address
– 3 Sub-Call Addresses
HW Addr 1 MHz
Fast Mode Plus (Fm+) compatible I2C protocol pin I2C Bus
58
I2C - LED Blinkers, Dimmers and Drivers
Application – PCA963x family 3. RGB / RGBA LED: any
color can be mixed
2. Use global PWM to set:
Brightness of your mixed color VDD
Plus set blinking rate
RGBA-LED
PCA963x
PWM 1
1. Use PWM per output
PWM 2
drivers
to set right color mix global
PWM
PWM n
59
I2C - LED Drivers, Blinkers and Dimmers
Application
60
I2C - LED Drivers, Blinkers and Dimmers
Product summary
61
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: PCA9551 (blinker) schematic
62
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: PCA9531 (dimmer) schematic
63
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: PCA9531 GUI (PCA9551 similar)
I2C address:
PCA9551 = 0xC0
PCA9531 = 0xC8
Auto Write
Feature
64
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: PCA9551 & PCA9531 on the board
PCA9551 PCA9531
65
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: Exercise A: PCA9551
1. Power sequence the board Æ Board OFF then ON
2. Open the PCA9551 GUI:
Device Æ LED Blinkers and Dimmers Æ PCA9551 8-bit LED Blinker
3. Read all the registers. What do you read?
All the LED outputs are OFF
Both blinking rates default to slower blinking rate (once every ~ 6.4 s, 50 % duty cycle)
4. Program the 4 LEDs connected to the PCA9551 as following:
LED0 ( Y): ON
LED1 ( B): Blinking Rate 0 with Blinking Rate 0 = 1s – 75 % duty cycle
LED2 ( G): OFF
LED3 ( R): Blinking Rate 1 with Blinking Rate 1 = 0.2 s (5 Hz) – 25 % duty cycle
Observe the result
5. Check the Auto Write option
Program LED0 to LED3 to Blinking Rate 0
Use the maximum frequency for Blinking Rate 0 (40 Hz) and change the duty cycle from min to max
back and forth. What do you observe?
Using the maximum frequency of the LED blinkers allow brightness control by changing the duty
cycle. However, the human eye can observe some flickering (no perfect dimming) due to the fact
that the dimming frequency is not high enough. Effective dimming is achieved with a PWM frequency
> 80 to 100 Hz
66
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: Exercise B: PCA9531
1. Power sequence the board Æ Board OFF then ON
2. a) Open the PCA9531 GUI:
Device Æ LED Blinkers and Dimmers Æ PCA9531 8-bit LED Dimmer
b) Open the PCA9543A GUI:
Device Æ Multiplexers/Switches Æ PCA9543A 2-channel switch with Interrupt Logic
Reminder – Architecture (see slide PCA9531 schematic):
a) The 2 PCA9531 have the same I2C address and the PCA9543A allows to select one
or the other
(or both)
b) The RGB LED is connected as following:
– Red: LED4 of PCA9531 Device 1 (PCA9543A Channel 0)
– Green: LED5 of PCA9531 Device 1 (PCA9543A Channel 0)
– Blue: LED4 of PCA9531 Device 2 (PCA9543A Channel 1)
3. Use the PCA9543A and PCA9531 GUIs to control individually the 3 LEDs
0 Rate 0
PCA9531 4
(1) Rate 1
5
PCA9543A
Rate 0
1 4
PCA9531
(2)
67
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: Exercise B (cont.): PCA9531
4. When it is understood how the RGB LEDs are controlled, program the two PCA9531
devices to display a “not too bright purple color” using the right amount of Red, Green
and Blue
(Hint: Use the PCA9543A (Switch) and PCA9531 GUIs to control individually the 3
LEDs)
5. Blink the LEDs displaying purple color
6. Now, program the two PCA9531 devices to display a “not too bright yellow color”
7. Blink the LEDs displaying Yellow color
68
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: Exercise C: PCA9531, PCA9551; using the expert mode
Write the following I2C sequences (Red) using the Expert Mode and execute it step by step:
1. Connect Jumpers SDA and SCL to Master 0 (Higher position) and enable Jumper JP15 (INT_IN) Æ
LED INT_IN should be ON
2. Power sequence the board Æ Board OFF then ON
3. Write to the PCA9551 to have LED0 / LED3 blinking at 1 Hz, 50% duty cycle and LED1/LED2
blinking at 2 Hz, 50 % duty cycle
4. Write to the 2 PCA9531 to have the 8 discrete blinking at 1 Hz, 50% duty cycle and the RGB LED
displaying a white color
5. Run the sequence above during 2s
6. Reset the 2 PCA9531 and the PCA9551 during 2s
7. Clear the reset conditions and loop back to the 1st instruction
Hints, methodology and Technical Information:
– Use the GUI’s to define the register values (easier than calculating with the
formulas)
– Resets are active low
– PCA9551 Reset line controlled by I/O0 ; PCA9531 Reset line controlled by I/O4
– Control register definition: see next slide
69
I2C - LED Drivers, Blinkers and Dimmers
Demoboard I2C 2005-1: Exercise C (cont.): PCA9531, PCA9551; Control register
70
I2C - EEPROM DIP switches
71
I2C - EEPROM DIP switches
3. E.g. fix the mux switch
Application voltage when you don’t
need the the external
1. Customers inputs
manufacturing / Test Unit
tells which calibration or
device configuration
value has to be stored
4.Product specific
GND settings are sent to local
VCC µC
I2C bus
DIP switch
µC Setting
µC
Test Unit
2. By using the EEPROM DIP
switches the device doesn’t Printed Circuit Board
have to be powered down and
the cabinet can stay closed Æ
reduced manufacturing cost
72
I2C - EEPROM DIP switches
Product overview
MUX_SELECT MUX_SELECT
MUX_OUT
MUX_OUT
MUX_IN MUX_IN
256 byte
GPIO IO
EEPROM
73
I2C - EEPROM DIP switches
PCA8550 / PCA9559
General PCA8550
Useful for ‘jumperless’ configuration of PC 4-bit 2-to-1 multiplexer, 1-bit latch DIP switch
motherboards
5-bit internal non-volatile register
2.5 V multiplexed outputs; 3.3 V non-
multiplexed output (latched)
MUX_SELECT
PCA8550 / PCA9559
NON_MUX_OUT
I2C Bus I 2C
control
PCA9559
EEPROM latch 5-bit 2-to-1 multiplexer, 1-bit latch DIP switch
6-bit internal non-volatile register
MUX_OUT
74
I2C - EEPROM DIP switches General
PCA9560 / PCA9561 Useful for ‘jumperless’ configuration of PC
motherboards
MUX_SELECT
2 address pins, allowing up to 4 devices on
the I2C-bus
PCA9560 / PCA9561
I2C Bus
I 2C
control PCA9560
EEPROM 1 5-bit 3-to-1 multiplexer, 1-bit latch DIP switch
select 5-bit external hardware pins
NON_MUX_OUT
logic
EEPROM n Two 6-bit internal non-volatile registers, fully
pin-to-pin compatible with PCA9559
mux I2C/SMBus interface logic
latch Open drain outputs
MUX_IN
MUX_OUT
mux
PCA9561
6-bit 5-to-1 multiplexer DIP switch
NOT in the PCA9561 6-bit external hardware pins
Quad 6-bit internal non-volatile registers`
75
I2C - EEPROM DIP switches 8 I/O MUX_SELECT
PCA9558
PCA9558
2 kbit
GPIO
5-bit 2-to-1 multiplexer with 1-bit latched EEPROM
MUX_OUT NON_MUX_OUT
from the 6-bit internal
I2C Bus
Input hardware pins readable via I 2C
EEPROM mux
control
I2C/SMBus
I2C and SMBus compatible latch
8-bit GPIO can directly drive LEDs
MUX_IN
2 kbit (256 x 8-byte) EEPROM mux
Application (Continued)
Multi-card systems in Telecom, Networking
Application and Base Station
76
I2C - EEPROM DIP switches
Product summary
# of Hardware
# of Register
Non-muxed
# of Muxed
input pins
# of Non-
# of Pins
registers
Type nr.
outputs
volatile
output
bits
PCA8550 16 1 5 4 4 Yes
PCA9559 20 1 6 5 5 Yes
PCA9560 20 2 6 5 5 Yes
PCA9561 20 4 6 6 6 No
PCA9558 28 1 6 5 5 Yes
77
I2C - Serial EEPROM & RAM
78
I2C - Serial EEPROM & RAM
Product overview
EEPROM EEPROM
Serial RAM
control
I2C Bus RAM
logic
79
I2C - Serial EEPROM & RAM
Product summary
80
I2C - LCD Drivers
81
I2C - LCD Drivers
Application
4. The large amount of
connections to the
display are very short
1. µC sends text
VCC
I2C bus
µC I2C LCD Driver
82
I2C - LCD Drivers
Principle of Chip On Glass (COG)
IC 1 5 LCD
2
chip
3
PCB only 1
4
83
I2C - LCD Drivers
Intermezzo: LCD basics
Vdrive
1. Vertical filter film to polarize the light as it
enters.
2. Glass substrate with ITO electrodes. The
shapes of these electrodes will determine
the dark shapes that will appear when the
LCD is turned on or off. Vertical ridges
etched on the surface are smooth.
3. Twisted nematic liquid crystals
4. Glass substrate with common electrode film
(ITO) with horizontal ridges to line up with
the horizontal filter (backplane).
5. Horizontal filter film to block/allow through
light.
6. Reflective surface to send light back to
viewer.
84
I2C - LCD Drivers
Intermezzo: driving LCD : static
85
I2C - LCD Drivers
Intermezzo: driving LCD: multiplex 1:2
86
I2C - LCD Drivers
Families
87
I2C - LCD Drivers
LCD segment drivers
backplane
Features sequencer
driver
Wide range of segment outputs
On-chip RAM with auto incremental bias voltage generator
addressing
Low power consumption
segment
No external components driver
Wide power supply range
On-chip LCD bias voltage
generation
88
I2C - LCD Drivers
Product summary - segment drivers
89
I2C - LCD Drivers
LCD character drivers
display
RAM
column
driver
90
I2C - LCD Drivers
Product summary – character drivers
91
I2C - LCD Drivers
LCD graphic drivers
Key products
PCF8531 34 x 128 small 4 x 20 chars of text, full graphic LCD graphic driver
PCF8535 65 x 133 medium graphics, 8 lines of text
PCF8811 80 x 128 large universal display control
logic
display
Features Serial / RAM
parallel /
Wide range of mux rates to optimize I2C Interface
power and display size
row
On-chip generation of LCD bias voltages sequencer
driver
Low number of external components
Low power consumption
bias voltage generator
Temperature compensation
PCF8535:
– Temperature read back
column
– Icon mode
driver
92
I2C - LCD Drivers
Product summary – graphic drivers
93
I2C - LCD Drivers
Demoboard - OM6290
94
I2C - Temperature and Voltage Sensors
95
I2C - Temperature and Voltage Sensors
Application
Interrupt
96
I2C - Temperature and Voltage Sensors
Families
Internal
Internal temp sensor temp sensor
Local / internal temp sensor Local / internal AND remote temp sensor
97
I2C - Temperature and Voltage Sensors
Product overview
Vcc
98
I2C - Temperature and Voltage Sensors
Product overview
99
I2C - Temperature and Voltage Sensors
Intermezzo: Accuracy versus Resolution
75 C
o
75 C
o
77 oC
Ambient
temperature
100
I2C - Temperature and Voltage Sensors
Intermezzo: Comparator versus Interrupt mode
Comparator mode: EVENT output is cleared by itself once the temperature drops below
the set points
Interrupt mode: EVENT output is latched and only cleared by writing to the clear event bit
101
I2C - Temperature and Voltage Sensors
Local-only temperature sensors
General: Products:
Produce highly accurate digital readings of LM75A/LM75B:
the ambient temperature – Local temperature sensor and
watchdog timer™
Read out via I2C or SMBus – Accuracy of ±2 ºC
– Drop-in replacement LM75
SE95:
Application: – More accurate version of the LM75A
Trigger interrupts, shut-down, or over- – Delivers superior performance in
temperature alarms power-sensitive applications
102
I2C - Temperature and Voltage Sensors
LM75A versus LM75B
103
I2C - Temperature and Voltage Sensors
Remote and local temperature sensors
General: Products:
Produce highly accurate digital readings of NE1617A:
the ambient temperature – Up to nine slave devices on same bus
Remotely monitor the temperature of the – Drop-in replacement NE1617,
thermal diode inside the CPU or the diode AD1021 or AD1021A
connected to PNP or NPN transistors NE1619:
To save power in laptop applications, the – Integrated voltage monitor: track five
standby pin (STBY) can be tied to the input supply voltages in the range of 0
battery’s “suspend” output. to 12 V with accuracy of ±2%
SA56004:
– Handheld and portable applications
– Includes offset register for system
Application: calibration
Trigger interrupts, shut-down, or over- – Dual outputs for fan control
temperature alarms – Interrupt
– Built-in diode fault detection
Industrial process control – One-shot conversion with power
optimization in shutdown mode
Notebook computers – Eight possible pre-configured slave
Servers device addresses
– Small, 8-pin package
Office electronics
104
I2C - Temperature and Voltage Sensors
Product summary
Operating current
Remote channels
0 .. 12 V voltage
Accuracy Local
Local channels
Thermal Alarm
input monitor
Supply range
Power down
current (μA)
Sensing
Sensing
Type nr.
Output
# bits)
(μA)
LM75A 1 1 ±2°C 0.125/11 2.8-5.5 1000 3.5
105
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: SE98 schematic
PCA9541/01
Address: 0xFE
SE98
Address: 0x30
106
I2C - Temperature and Voltage Sensors
Demoboard 2005-1: SE98 on the board
SE98
107
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: SE98 GUI
Temperature Reading Alarm Status bits
Device Cyclic
Address Read
Configuration
& Status Alarm
Registers set points
Auto
Write
108
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: Exercise A: SE98, Device Initialization
Set critical boundary alarm trip to 80 °C Set upper boundary alarm trip to 27 °C
boundary registers
Set hysteresis
to 1.5 °C
109
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: Exercise A: SE98, EVENT output in Comparator vs
Interrupt Mode
110
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: Exercise A (cont.): SE98
1. Read the upper, lower and critical alarm boundary trips registers. What are their values?
2. Upper = 28 °C; Lower = 0 °C; Critical = 85 °C
3. Change the upper, lower and critical alarm boundary trip to 35 °C, -20 °C, and 125 °C
and read them back. What are their values?
Upper = 35 °C
Lower = - 20 °C
Critical = 125 °C
4. Check the “lock the Critical” and “lock alarm window” bits
5. Change the upper, lower, and critical alarm boundary trips to 28 °C, 0 °C, and 85 °C, and
read them back. What are their values? No change
6. Remove the power will reset remove the lock feature
Conclusion: lock bit protects alarm set point values. Once lock bit is written, you can only
clear it by powering off the SE98.
111
I2C - Temperature and Voltage Sensors
Demoboard 2005-1: Exercise B: SE98, Expert mode
112
I2C - Temperature and Voltage Sensors
Demoboard 2005-1: Exercise B (cont.): SE98, Expert mode
Above Critical indicates whether the temperature exceeds the critical temperature Sign bit
0: temp is below critical temperature 0: positive temperature
1: temp exceeds critical temperature 1: negative temperature
Above ALARM window indicates whether the temperature exceeds the alarm temperature
0: temperature is below the upper alarm
1: temperature exceeds the upper alarm
Below ALARM Window indicates whether the temperature falls below the lower alarm
0: temperature is above the lower alarm
1: temperature falls below the Lower ALARM
1 1 1
Integer Decimal
Reserved for future use
113
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: Exercise B (cont.): SE98, Register summary
114
I2C - Temperature and Voltage Sensors
Demoboard 2005-1: Exercise B (cont.): SE98, Configuration register
Critical Lock Bit
Hysteresis for alarm
0: alarm register not locked, register value can be changed Clear EVENT flag 00: hysteresis disabled
1: alarm register locked , register value cannot be changed 0: no effect 01: hysteresis = 1.5 °C
1: clear the event flag in 10: hysteresis = 3 °C
ALARM Lock Bit interrupt mode 11: hysteresis = 6 °C
0: Alarm not locked, upper and lower alarm can be modified
1: Alarm locked, upper and lower alarm cannot be modified
0: Temp sensor shutdown mode
1: Normal mode
EVENT Status bit EVENT output control bit Critical EVENT Only EVENT Polarity EVENT Mode
0: not asserted 0: EVENT output disabled 0: Critical+Alarm 0: Active low 0: Comparator mode
1: asserted 1: EVENT output enabled 1: Critical 1: Active high 1: Interrupt mode
115
I2C - Temperature and Voltage Sensors
Demoboard I2C 2005-1: Exercise B (cont.): SE98, solution
116
I2C - Real Time Clocks / Calendars
117
I2C - Real Time Clocks / Calendars
118
I2C - Real Time Clocks / Calendars
Application
VDD
I2C bus
µC
Interrupt
119
I2C - Real Time Clocks / Calendars
Product overview
Clock clock /
alarm
calendar
registers
registers
Interrupt
120
I2C - Real Time Clocks / Calendars
PCA8565 / PCF8563 / PCF8583 / PCF8593
General: Products:
Time keeping PCA8565:
– High temperature (up to 125 °C)
Large voltage range 1.0 .. 5.5 V
PCF8563:
Clock from seconds to 99 years – Low power: < 250 nA
Programmable Timer
Frequency output PCF8583:
Small packages (TSSOP8, HVSON10, etc) – 240-byte RAM
PCF8593:
– 1/100-second resolution
Application:
Time keeping, calendar
Tariff switching
Integrity check after power-down
121
I2C - Real Time Clocks / Calendars
Product summary
2 μA @ 1.0 V 1 μA @ 2.0 V
Typical power consumption 700 nA @ 2 V 250 nA @ 1 V
10 μA@ 5 V 4 μA @ 5 V
122
I2C - Real Time Clocks / Calendars
Demoboard I2C 2005-1: PCF8563 Schematic
PCA9543A
Address = E0h PCF8563
Address = A2h
123
I2C - Real Time Clocks / Calendars
Demoboard I2C 2005-1: PCF8563 on the board
PCF8563
124
I2C - Real Time Clocks / Calendars
Demoboard I2C 2005-1: PCF8563 GUI
Clock Calendar
Alarm
Clock
125
I2C - Real Time Clocks / Calendars
Demoboard I2C 2005-1: Exercise A: PCF8563 Alarm Mode
1. Click on the reset push button to reset alarm, timer, clock and calendar
2. Alarm mode: Minute, hour, day, or week
3. Click on the cyclic read push button
4. Select the alarm minute enable checkbox
5. Select the alarm interrupt enable (AIE) checkbox
6. Set alarm to 1 minute
7. Do a “write all” on the screen to update the register
8. What do you see when the clock time reaches 1 minute?
9. Interrupt is asserted and interrupt LED is on
10. Alarm flag (AF) status bit is set
11. Clear AF (by uncheck the box and do a “Write All”)
126
I2C - Real Time Clocks / Calendars
Demoboard I2C 2005-1: Exercise B: PCF8563 Timer Mode
1. The timer has a selectable count down frequency ranging from 1/64 Hz to
4096 Hz, and an 8-bit or 256 count down value
2. Chose 1 Hz (1 sec) timer count down frequency
3. Program a count down value of 12
4. Select timer interrupt enable (TIE) checkbox
5. Enable timer
6. Perform a “Write All“ command
7. Wait for 12 seconds, read the status register, and observe the Interrupt LED
light
8. What happens to TF and LED?
9. TF is set
10. LED is ON
127
I2C - Portfolio: bus architecture devices
128
I2C - Bus Enablers
129
I2C - Bus controllers
130
I2C - Bus controllers
Application
131
I2C - Bus controllers
Product overview
Bus controller
8-bit
parallel bus logic I2C Bus
control signals
Bus controller
with memory
8-bit
parallel bus logic I2C Bus
control signals
memory
132
I2C - Bus controllers
Product summary
2
Voltage Range Max I C Freq. Clock Source Parallel Interface
PCF8584 4.5V - 5.5V 90kHz External Slow
PCA9564 2.3V - 3.6V; with 5V Tolerance 360kHz Internal Fast
PCA9665 2.3V - 3.6V; with 5V Tolerance 1000kHz Internal (Trimmed) Fast with 68 Byte Buffer
133
I2C - Master selector / demux
134
I2C - Master selector / demux
Product overview
2-to-1 I2C-bus
master selector
Master0 logic
I2C Bus
Slave devices
off
I2C Bus
Master1
I2C Bus
135
I2C - Master selector / demux
PCA9541 - 2-to-1 I2C-bus master selector
Features Applications
Channel selection via I2C -bus High-End Servers, Base Stations and Mass
Storage systems with high maintenance
Downstream bus initialization/recovery requirements
function before changing channel
Two independent masters to a single I2C
Bus traffic sensor slave device
No glitch on power-up and supports hot
insertion
Software identical for both masters
Voltage translation between 1.8 V, 2.5 V, Versions
3.3 V and 5 V buses PCA9541/01 - Master Channel 0 selected
Operating power supply voltage range of after power-up/reset
2.3 V to 5.5 V PCA9541/03 - No master channel (off)
4 address pins allowing up to 16 devices on selected after power-up/reset and either
the I2C-bus master can take control of the bus
136
I2C - Master selector / demux
PCA9541 - application
137
I2C - Master selector / demux
PCA9541 – application (2)
138
I2C - Master selector / demux
PCA9541 - application (3)
139
I2C - Master selector / demux
PCA9541 - application (4)
140
I2C - Multiplexers & switches
141
I2C - Multiplexers & switches
Application
142
I2C - Multiplexers & switches
Product overview
Mux/Switches
Mux/Switches Master
MasterSelector
SelectorInterrupt
Interrupt&&Reset
Reset
PCA9541/01,
Family
Family PCA9541/01,/03/03
2:1
2:1Mux/Switches
Mux/Switches 4:1
4:1Mux/Switches
Mux/Switches 8:1
8:1Mux/Switch
Mux/Switch
Mux
Mux
Mux Mux
MuxInterrupt
Interrupt Mux&&Reset
Reset
PCA9540B PCA9544A PCA9547
PCA9540B PCA9544A PCA9547
Switch
Mux
MuxInterrupt
Interrupt Switch
SwitchInterrupt
Interrupt&&Reset
Reset Switch&&Reset
Reset
PCA942A PCA9545A/B/C* PCA9548A
PCA942A PCA9545A/B/C* NEW PCA9548A
Octal
Switch
SwitchInterrupt
Interrupt&&Reset
Reset OctalCBT
CBTSwitch
Switch
Switch
PCA9543A/B/C*
PCA9543A/B/C* NEW SwitchInterrupt
Interrupt&&Reset
Reset PCA9549
PCA9549
PCA9546A NEW
PCA9546A
143
I2C - Multiplexers & switches
Product summary
144
I2C - Bus expander, hub or repeater
145
I2C - Bus expander, hub or repeater
When to use?
146
I2C - Bus expander, hub or repeater
Product Overview Bus
BusBuffers/Translator
Buffers/Translator Voltage
VoltageTranslator
TranslatorOnly
Only
Family PCA9306
Family PCA9306 NEW
Repeater
Repeater Hot-Swap
Hot-Swap Extender
Extender
PCA9515/15A
PCA9515/15A Long
Voltage
VoltageTranslator
Translator Longcable
cable
PCA9512A P82B96, PCA9600
PCA9512A P82B96, PCA9600
Voltage
VoltageTranslator
Translator
PCA9509/17
PCA9509/17 11MHz
0.6
0.6VVthreshold
threshold MHzspeed
speed
PCA9511A PCA9600 NEW
Quad PCA9600
QuadVoltage
VoltageTranslator
Translator PCA9511A
PCA9519
PCA9519 AdvancedTCA
0.8
0.8VVthreshold
threshold AdvancedTCA
P82B715
Offset-Free PCA9514A P82B715
Offset-FreeHot-Swap
Hot-Swap PCA9514A
PCA9508 NEW
PCA9508
Opto-isolation
92μA Opto-isolation
5-channel
5-channelHub
Hub 92μACurrent
CurrentSource
Source P82B96
P82B96
PCA9513A
PCA9516/16A PCA9513A
PCA9516/16A
12
5-channel 12VVSupply
SupplyCapable
Capable
5-channelHub
HubExpander
Expander No
Noaccelerator P82B96,
P82B96, P82B715,PCA9600
accelerator P82B715,
PCA9518A PCA9510A PCA9600
PCA9518A PCA9510A
147
I2C - Bus expander, hub or repeater
PCA9507 versus PCA9517/17A
* Note: Longer cable stretches clock low time and requires less than 400 kHz speed operation
148
I2C - Bus expander, hub or repeater
PCA9517A - HDMI DDC Buffer for LCDTV
Features
Benefits
• 2-wire bidirectional DDC Buffer
• Isolates capacitance and noise
• Dual supply rail for DDC level shift
and level shift
• Normal I/O swing on A-side
• Incurs no offset voltage
• 5kV ESD HBM
LCD TV
149
I2C - Bus expander, hub or repeater
PCA9507 HDMI DDC Buffer/Extender
Features Benefits
Bidirectional bus buffer Isolate capacitance & noise on DDC line
Rise time accelerator on A-side Extend DDC line > 18 m
Strong A-side driver Increase noise margin on DDC line
5 kV ESD HBM Require no external discrete components
Dual Supplies Permit 5V DDC level shift
Digital TV
DVDR/STB
PCA9507
150
I2C - Bus expander, hub or repeater
PCA9517A – High ESD I2C Bus Buffer
Features:
Redundant Power Supply
I2C bidirectional buffer
PCA9517A cable
Ethernet Switch
Dual supply rails PCA9517A
– Voltage translation PCA9517A
PCA9517A
Normal I/O voltage swing with
..
PCA9517A :
Benefits:
Redundant Power Supply Ethernet Switch
Isolates capacitance and noise PCA9517A buffers each end of the cable
for cable application
Incurs no offset voltage
151
I2C Demo Boards
152
I2C - Demo Boards
PCA9633 LED dimmer / blinker
OM6276
http://www.standardics.nxp.com/support/boards/pca9633
153
I2C - Demo Boards
SC18IS602 I2C slave to SPI master
http://www.standardics.nxp.com/support/boards/sc18is602
154
I2C - Demo Boards
SC18IM700 UART to I2C master / GPIO bridge
OM6272
http://www.standardics.nxp.com/support/boards/sc18im700
155
I2C - Demo Boards
SC18IS600 SPI slave to I2C master / GPIO bridge
http://www.standardics.nxp.com/support/boards/sc18is600
156
I2C - Demo Boards
I2C 2005-1 kit: easy programming and evaluation of I2C devices
http://www.standardics.nxp.com/support/boards/i2c20051
157
I2C - Demo Boards
PCA9564: I2C bus controller
OM6277
http://www.standardics.nxp.com/support/boards/pca9564
158
I2C - Demo Boards
LED dimmer board: demonstrates LED lighting and mixing operations
OM6279
http://www.standardics.nxp.com/support/boards/leddemo
159
I2C Support Information
160
I2C - Support Information
161
162