Rev 0; 9/04 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory The DS4550 is a 9-bit, nonvolatile (NV) I/O expander with 64 bytes of NV user memory controlled by either an I2CTM-compatible serial interface or an IEEE 1149.1 JTAG port. The DS4550 offers a digitally programmable alternative to hardware jumpers and mechanical switches that are being used to control digital logic nodes. Each I/O pin is independently configurable. The outputs are open drain with selectable pullups. Each output has the ability to sink up to 16mA, and since the device is NV, it powers up in the desired state allowing it to control digital logic inputs immediately on powerup without having to wait for the host CPU to initiate control. Applications Features ♦ Programmable Replacement for Mechanical Jumpers and Switches ♦ Nine NV Inputs/Outputs ♦ 64-Byte NV User Memory (EEPROM) ♦ I2C-Compatible Serial Interface and JTAG ♦ Up to 8 Devices can be Multidropped on the Same I2C Bus ♦ IEEE 1149.1 Boundary Scan Compliant ♦ Open-Drain Outputs with Configurable Pullups ♦ Outputs Capable of Sinking 16mA RAM-Based FPGA Bank Switching for Multiple Profiles ♦ Low Power Consumption Selecting Between Boot Flash ♦ Operating Temperature Range: -40°C to +85°C Setting ASIC Configurations/Profiles ♦ Wide Operating Voltage Range: 2.7V to 5.5V Ordering Information Servers Network Storage PART TEMP RANGE PIN-PACKAGE -40°C to +85°C 20 TSSOP Routers DS4550E Telecom Equipment Add “/T&R” for tape and reel orders. PC Peripherals Typical Operating Circuit Pin Configuration TOP VIEW VCC I/O_0 1 20 GND I/O_1 2 19 I/O_8 I/O_2 3 18 I/O_7 I/O_3 4 17 I/O_6 4.7k 16 I/O_5 I/O_4 5 A0 6 0.1µF DS4550 15 A2 A1 7 14 TDO TCK 8 13 TDI TMS 9 12 SCL VCC 10 11 SDA I 2C INTERFACE JTAG INTERFACE VCC A0 A1 A2 GND SCL SDA TCK TMS TDI TDO DS4550 I/O_0 I/O_1 I/O_2 I/O_3 I/O_4 I/O_5 I/O_6 I/O_7 I/O_8 FPGA CLOCK GENERATOR CPU SPEED SELECT TSSOP I2C is a trademark of Philips Corp. Purchase of I2C components from Maxim Integrated Products, Inc., or one of its sublicensed Associated Companies, conveys a license under the Philips I2C Patent Rights to use these components in an I2C system, provided that the system conforms to the I2C Standard Specification as defined by Philips. ______________________________________________ Maxim Integrated Products For pricing, delivery, and ordering information, please contact Maxim/Dallas Direct! at 1-888-629-4642, or visit Maxim’s website at www.maxim-ic.com. 1 DS4550 General Description DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory ABSOLUTE MAXIMUM RATINGS Voltage on VCC, SDA, and SCL Pins Relative to Ground.............................................-0.5V to +6.0V Voltage on A0, A1, A2, TCK, TMS, TDI, and I/O_n [n = 0 to 8] Relative to Ground ...................................-0.5V to VCC + 0.5V, not to exceed +6.0V. Operating Temperature Range ...........................-40°C to +85°C EEPROM Programming Temperature Range .........0°C to +70°C Storage Temperature Range .............................-55°C to +125°C Soldering Temperature .....................See IPC/JEDEC J-STD-020 Specification Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. RECOMMENDED OPERATING CONDITIONS (TA = -40°C to +85°C) PARAMETER SYMBOL CONDITIONS (Note 1) MIN TYP MAX UNITS +2.7 +5.5 V Supply Voltage VCC Input Logic 1 VIH 0.7 x VCC VCC + 0.3 V Input Logic 0 VIL -0.3 0.3 x VCC V MAX UNITS DC ELECTRICAL CHARACTERISTICS (VCC = +2.7V to +5.5V, TA = -40°C to +85°C, unless otherwise noted.) PARAMETER Standby Current Input Leakage Input Current each I/O pin Low-Level Output Voltage (SDA) SYMBOL ISTBY CONDITIONS (Note 2) IL II/O VOL SDA MIN 0.4 < VI/O < 0.9 x VCC TYP 10 µA -1.0 2 +1.0 µA -1.0 +1.0 µA 3mA sink current 0.4 6mA sink current 0.6 V I/O Pins Low-Level Output Voltage Low-Level Output Voltage (TDO) VOL I/O 16mA sink current 0.4 V VOL TDO 4mA sink current 0.4 V High-Level Output Voltage (TDO) VOH TDO 1mA source current 2.4 V I/O Pin Pullup Resistors RPU 4.0 5.5 7.5 kΩ TMS, TDI Pullup Resistors RJPU 7.5 10 12.5 kΩ 10 pF I/O Capacitance CI/O Power-On Reset Voltage VPOR 2 (Note 3) _____________________________________________________________________ 1.6 V I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory DS4550 AC ELECTRICAL CHARACTERISTICS-–I2C Interface (See Figure 5) (VCC = +2.7V to +5.5V, TA = -40°C to +85°C, unless otherwise noted. Timing referenced to VIL(MAX) and VIH(MIN).) PARAMETER SYMBOL SCL Clock Frequency fSCL Bus Free Time Between Stop and Start Conditions tBUF Hold Time (Repeated) Start Condition tHD:STA CONDITIONS (Note 4) MIN TYP 0 (Note 5) MAX UNITS 400 kHz 1.3 µs 0.6 µs µs Low Period of SCL tLOW 1.3 High Period of SCL tHIGH 0.6 Data Hold Time tHD:DAT 0 Data Setup Time tSU:DAT 100 ns Start Setup Time tSU:STA 0.6 µs µs 0.9 µs SDA and SCL Rise Time tR (Note 6) 20 + 0.1CB 300 ns SDA and SCL Fall Time tF (Note 6) 20 + 0.1CB 300 ns Stop Setup Time tSU:STO 0.6 SDA and SCL Capacitive Loading CB (Note 6) EEPROM Write Time tWR I2C EEPROM write (Note 7) µs 400 pF 10 20 ms TYP MAX UNITS AC ELECTRICAL CHARACTERISTICSJTAG Interface (See Figure 1) (VCC = +2.7V to +5.5V, TA = -40°C to +85°C, unless otherwise noted.) PARAMETER TCK Clock Period TCK Clock High/Low Time SYMBOL CONDITIONS MIN t1 t2, t3 (Note 8) 50 1000 ns 500 ns TCK to TDI, TMS Setup Time t4 15 ns TCK to TDI, TMS Hold Time t5 10 ns TCK to TDO Delay t6 50 TCK to TDO High-Z Delay t7 50 ns 20 ms EEPROM Write Time tWR JTAG EEPROM write (Note 9) 10 ns _____________________________________________________________________ 3 DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory NONVOLATILE MEMORY CHARACTERISTICS (VCC = +2.7V to +5.5V, unless otherwise noted.) PARAMETER SYMBOL EEPROM Writes CONDITIONS MIN +70°C (Note 3) TYP MAX UNITS 50,000 Note 1: Note 2: Note 3: Note 4: Note 5: Note 6: Note 7: All voltages referenced to ground. ISTBY is specified with SDA = SCL = TMS = TDI = VCC, outputs floating, and inputs connected to VCC or GND. Guaranteed by design. Timing shown is for fast-mode (400kHz) operation. This device is also backward-compatible with I2C standard mode timing. After this period, the first clock pulse is generated. CBtotal capacitance of one bus line in picofarads. EEPROM write time applies to all the EEPROM memory and SRAM-shadowed EEPROM memory when SEE = 0. The EEPROM write time begins after a stop condition occurs. Note 8: TCK can be stopped either high or low. Note 9: EEPROM write begins immediately after the UPDATE-DR state that latches the data to be written. The EEPROM cannot be accessed until the EEPROM write has completed. However, the remainder of the JTAG functionality is active and accessible during the EEPROM write. t1 t2 t3 TCK t4 t5 TDI, TMS t6 t7 TDO Figure 1. JTAG Timing Diagram 4 _____________________________________________________________________ I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory SUPPLY CURRENT vs. SUPPLY VOLTAGE I/O0-I/O7 CONTROL BITS = 0 I/O0-I/O7 PULLUPS DISABLED SUPPLY CURRENT (µA) 1 0.5 1.5 VCC = SDA = SCL = 5.5V = TCK 1 0.5 18 16 SUPPLY CURRENT (µA) 2 1.5 20 DS4550 toc03 I/O0-I/O7 CONTROL BITS = 0 I/O0-I/O7 PULLUPS DISABLED VCC = SDA = SCL = TCK DS4550 toc02 2.5 DS4550 toc01 2 14 12 VCC = SDA = TCK = 5.0V 10 8 6 4 VCC = SDA = SCL = 2.7V = TCK 2 0 4 4.5 5 5.5 -40 -20 0 20 40 60 100 25 SDA = SCL = VCC 20 200 300 400 SCL FREQUENCY (kHz) SUPPLY CURRENT vs. TCK FREQUENCY I/O OUTPUT VOLTAGE vs. SUPPLY VOLTAGE 15 VCC = 5.0V 10 VCC = 2.7V 5 0 80 TEMPERATURE (°C) 0 DS4550 toc05 3.5 SUPPLY VOLTAGE (V) PULL-UPS ENABLED PULL-DOWNS DISABLED 5 I/O OUTPUT VOLTAGE (V) 3 DS4550 toc04 2.5 VCC = SDA = TCK = 2.7V 0 0 SUPPLY CURRENT (µA) SUPPLY CURRENT (µA) SUPPLY CURRENT vs. SCL FREQUENCY SUPPLY CURRENT vs. TEMPERATURE 4 3 HIGH IMPEDANCE 2 EEPROM RECALL AT VPOR 1 0 0 250 500 750 1000 1250 1500 1750 2000 TCK FREQUENCY (kHz) 0 1 2 3 4 5 SUPPLY VOLTAGE (V) _____________________________________________________________________ 5 DS4550 Typical Operating Characteristics (VCC = +5.0V, TA = +25°C; TDI, TDO, TMS pins are no connects, unless otherwise noted.) I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory DS4550 Pin Description 6 PIN NAME FUNCTION 1 I/O_0 Input/Output 0. Bidirectional I/O pin. 2 I/O_1 Input/Output 1. Bidirectional I/O pin. 3 I/O_2 Input/Output 2. Bidirectional I/O pin. 4 I/O_3 Input/Output 3. Bidirectional I/O pin. 5 I/O_4 Input/Output 4. Bidirectional I/O pin. 6 A0 I2C Address Input. Inputs A0, A1, and A2 determine the I2C slave address of the device. 7 A1 I2C Address Input. Inputs A0, A1, and A2 determine the I2C slave address of the device. 8 TCK JTAG Test Clock. This signal is used to shift data into TDI on the rising edge and out of TDO on the falling edge. 9 TMS JTAG Test Mode Select. This pin is sampled on the rising edge of TCK and used to place the TAP into the various defined JTAG states. This pin has an internal pullup resistor. 10 VCC Power Supply Voltage 11 SDA I2C Serial Data Open-Drain Input/Output 12 SCL I2C Serial Clock Input 13 TDI JTAG Test Data Input. Test instructions and data are clocked into this pin on the rising edge of TCK. This pin has an internal pullup resistor. 14 TDO JTAG Test Data Output. Test instructions and data are clocked out of this pin on the falling edge of TCK. If not used, this pin should be left open circuit. 15 A2 16 I/O_5 Input/Output 5. Bidirectional I/O pin. 17 I/O_6 Input/Output 6. Bidirectional I/O pin. 18 I/O_7 Input/Output 7. Bidirectional I/O pin. 19 I/O_8 Input/Output 8. Bidirectional I/O pin. 20 GND Ground I2C Address Input. Inputs A0, A1, and A2 determine the I2C slave address of the device. _____________________________________________________________________ I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory VCC VCC DS4550 SDA SCL A0 A1 A2 BSC BSC BSC BSC BSC I2C INTERFACE PULLUP ENABLE (F0h-F1h) VCC RJPU TMS TDI TDO TCK GND I/O CONTROL REGISTERS BSC RPU EEPROM 64 BYTES USER MEMORY RJPU JTAG CONTROL PORT (x9) VCC I/O CELL I/O_n [n = 0 TO 8] I/O CONTROL (F2h-F3h) BSC I/O STATUS (F8h-F9h) BSC BOUNDARY SCAN CELL (BSC) Detailed Description The DS4550 contains nine bidirectional, NV, input/output (I/O) pins, and a 64-byte EEPROM user memory. The I/O pins and user memory are accessible through either the I2C compatible serial bus or the IEEE 1149.1 JTAG interface. Programmable NV I/O Pins Each programmable I/O pin consists of an input and an open-collector output with a selectable internal pullup resistor. To enable the pullups for each I/O pin, write to the Pullup Enable Registers (F0h and F1h). To pull the output low or place the pulldown transistor into a high- impedance state, write to the I/O Control Registers (F2h and F3h). To read the voltage levels present on the I/O pins, read the I/O Status Registers (F8h and F9h). To determine the status of the output register, read the I/O Control Registers and the Pullup Resistor Registers. The I/O Control Registers and the Pullup Enable Registers are all SRAM-shadowed EEPROM registers. It is possible to disable the EEPROM writes of the registers using the SEE bit in the Configuration Register. This reduces the time required to write to the register and increases the amount of times the I/O pins can be adjusted before the EEPROM is worn out. _____________________________________________________________________ 7 DS4550 Block Diagram DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Memory Map and Memory Types The DS4550 memory map is shown in Table 1. Three different types of memory are present in the DS4550: EEPROM, SRAM-shadowed EEPROM, and SRAM. Memory locations specified as EEPROM are NV. Writing to these locations results in an EEPROM write cycle for a time specified by tWR in the AC Electrical Characteristics table. Locations specified as SRAMshadowed EEPROM can be configured to operate in one of two modes specified by the SEE bit (the LSB of the Configuration Register, F4h). When the SEE bit = 0 (default), the memory location acts like EEPROM. However, when SEE = 1, shadow SRAM is written to instead of the EEPROM. This eliminates both the EEPROM write time, tWR, as well as the concern of wearing out the EEPROM. This is ideal for applications that wish to constantly write to the I/Os. Power-up default states can be programmed for the I/Os in EEPROM (with SEE = 0) and then once powered up, SEE can be written to a 1 so that the I/Os can be updated periodically in SRAM. The final type of memory present in the DS4550 is standard SRAM. Table 1. DS4550 Memory Map ADDRESS 00h to 3Fh TYPE FUNCTION FACTORY DEFAULT User Memory 64 Bytes of General-Purpose User EEPROM. Reserved Undefined Address Space for Future Expansion. Reads and writes to this space will have no affect on the device. Reserved F0h Pullup Enable 0 Pullup Enable for I/O_0 to I/O_7. I/O_0 is the LSB and I/O_7 is the MSB. Set the corresponding bit to enable the pullup; clear the bit to disable the pullup. 00h F1h Pullup Enable 1 Pullup Enable for I/O_8. I/O_8 is the LSB. Only the LSB is used. Set the LSB bit to enable the pullup on I/O_8; clear the LSB to disable the pullup. 00h I/O Control 0 I/O Control for I/O_0 to I/O_7. I/O_0 is the LSB and I/O_7 is the MSB. Clearing the corresponding bit of the register pulls the selected I/O pin low; setting the bit places the pulldown transistor into a highimpedance state. When the pulldown is high impedance, the output will float if no pullup/down is connected to the pin. FFh I/O Control 1 I/O Control for I/O_8. I/O_8 is the LSB. Only the LSB is used. Clearing the LSB of the register pulls the I/O_8 pin low; setting the LSB will place the pulldown transistor into a high-impedance state. When the pulldown is high impedance, the output will float if no pullup/down is connected to the pin. 01h 40 to E7h E8 to EFh EEPROM NAME EEPROM F2h SRAM Shadowed EEPROM F3h [EEPROM writes are disabled if the SEE bit = 1] Configuration Register. The LSB is the SEE bit. When set, this bit disables writes to the EEPROM; writing only effects the shadow SRAM. When set to 0, both the EEPROM and the shadow SRAM is written 3 bytes of General-Purpose User EEPROM 00h F4h Configuration F5h to F7h User Memory F8h I/O Status 0 I/O Status for I/O_0 to I/O_7. I/O_0 is the LSB and I/O_7 is the MSB. Writing to this register has no effect. Read this register to determine the state of the I/O_0 to I/O_7 pins. I/O Status 1 I/O Status for I/O_8. I/O_8 is the LSB. Only the LSB is used; the other bits could be any value when read. Writing to this register has no effect. Read this register to determine the state of the I/O_8 pin. SRAM User Memory 6 Bytes of General-Purpose SRAM SRAM F9h FAh to FFh 8 _____________________________________________________________________ 00h 00h I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory MSB 1 LSB 0 1 0 A2 A1 A0 R/W READ/WRITE BIT SLAVE ADDRESS* *THE SLAVE ADDRESS IS DETERMINED BY ADDRESS PINS A0, A1, AND A2. IEEE 1149.1 JTAG Operation The DS4550 contains an IEEE 1149.1 compliant JTAG port in addition to the I2C serial bus. Either can be used to access the internal memory. However, the device contains no bus arbitration and hence both busses cannot be used at the same time. All of the I/O pins on the DS4550 are IEEE 1149.1 boundary-scan compliant. I/O_0 to I/O_8 as well as the I2C port pins, contain the typical JTAG boundary scan cells, which allow the pins to be polled or forced high/low using standard JTAG instructions. The DS4550 also contains some extensions to normal JTAG functionality, which allows access to the internal memory. In particular, the DS4550 has three device-specific test data registers (Memory Address, Memory Read, and Memory Write) and three device-specific instructions (ADDRESS, READ, and WRITE), which provide memory access. Figure 2. DS4550 I2C Slave Address Byte EEPROM MSB TEST REGISTERS LSB MEMORY ADDRESS REGISTER [LENGTH = 8 BITS] MEMORY READ REGISTER [LENGTH = 8 BITS] MEMORY WRITE REGISTER [LENGTH = 8 BITS] MUX 1 BOUNDARY SCAN REGISTER [LENGTH = 33 BITS] IDENTIFICATION REGISTER [LENGTH = 32 BITS] BYPASS REGISTER [LENGTH = 1 BIT] VCC RJPU INSTRUCTION REGISTER [LENGTH = 4 BITS] VCC MSB MUX 2 TDO LSB RJPU TDI TMS TCK TEST ACCESS PORT (TAP) CONTROLLER Figure 3. DS4550 JTAG Block Diagram _____________________________________________________________________ 9 DS4550 Slave Address and Address Pins The DS4550’s I2C slave address is determined by the state of the A0, A1, and A2 address pins as shown in Figure 2. Address pins connected to GND result in a ‘0’ in the corresponding bit position in the slave address. Conversely, address pins connected to VCC result in a ‘1’ in the corresponding bit positions. I2C communication is described in detail in a later section. DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Test Access Port (TAP) Controller State Machine rising edge of TCK, the controller goes to the Shift-DR state if TMS is LOW or it goes to the Exit1-DR state if TMS is HIGH. The TAP controller is a finite state machine that responds to the logic level at TMS on the rising edge of TCK (see Figure 4). Test-Logic-Reset. Upon power-up, the TAP controller is in the Test-Logic-Reset state. The Instruction Register contains the IDCODE instruction. All system logic of the device operates normally. Run-Test/Idle. The Run-Test/Idle state is used between scan operations or during specific tests. The Instruction Register and test data registers remain idle. Select-DR-Scan. All test data registers retain their previous state. With TMS LOW, a rising edge of TCK moves the controller into the Capture-DR state and initiates a scan sequence. TMS HIGH during a rising edge on TCK moves the controller to the Select-IR-Scan state. Capture-DR. Data can be parallel-loaded into the test data registers selected by the current instruction. If the instruction does not call for a parallel load or the selected test data register does not allow parallel loads, the test data register remains at its current value. On the 1 Shift-DR. The test data register selected by the current instruction is connected between TDI and TDO and shifts data one stage toward its serial output on each rising edge of TCK while TMS is LOW. On the rising edge of TCK, the controller goes to the Exit1-DR state if TMS is HIGH. Exit1-DR. While in this state, a rising edge on TCK puts the controller in the Update-DR state. A rising edge on TCK with TMS LOW puts the controller in the Pause-DR state. Pause-DR. Shifting of the test data registers is halted while in this state. All test data registers retain their previous state. The controller remains in this state while TMS is LOW. A rising edge on TCK with TMS HIGH puts the controller in the Exit2-DR state. Exit2-DR. A rising edge on TCK with TMS HIGH while in this state puts the controller in the Update-DR state. A rising edge on TCK with TMS LOW enters the Shift-DR state. TEST-LOGIC-RESET 0 0 RUN-TEST/IDLE 1 SELECT-DR-SCAN 1 SELECT-IR-SCAN 0 1 0 1 CAPTURE-DR CAPTURE-IR 0 0 SHIFT-DR 1 1 1 0 PAUSE-IR 0 1 0 1 0 EXIT2-DR EXIT2-IR 1 1 UPDATE-DR UPDATE-IR 0 Figure 4. TAP Controller State Diagram 10 1 EXIT1-IR 0 PAUSE-DR 1 0 SHIFT-IR 0 EXIT1-DR 0 1 ____________________________________________________________________ 1 0 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Exit2-IR. A rising edge on TCK with TMS HIGH puts the controller in the Update-IR state. The controller loops back to Shift-IR if TMS is LOW during a rising edge of TCK in this state. Update-IR. The instruction code that has been shifted into the Instruction shift register is latched to the parallel outputs of the Instruction Register on the falling edge of TCK as the controller enters this state. Once latched, this instruction becomes the current instruction. A rising edge on TCK with TMS LOW puts the controller in the Run-Test/Idle state. With TMS HIGH, the controller enters the Select-DR-Scan state. Instruction Register The Instruction Register contains a shift register as well as a latched parallel output and is 4 bits in length. When the TAP controller enters the Shift-IR state, the Instruction shift register is connected between TDI and TDO. While in the Shift-IR state, a rising edge on TCK with TMS LOW shifts the data one stage toward the serial output at TDO. A rising edge on TCK in the Exit1-IR state or the Exit2-IR state with TMS HIGH moves the controller to the UpdateIR state. The falling edge of that same TCK latches the data in the Instruction shift register to the Instruction Register parallel output. Instructions supported by the DS4550 and its respective operational binary codes are shown in Table 2 below. SAMPLE/PRELOAD. This is a mandatory instruction for the IEEE 1149.1 specification that supports two functions. The digital I/Os of the device can be sampled at the Boundary Scan test data register without interfering with the normal operation of the device by using the Capture-DR state. SAMPLE/PRELOAD also allows the device to shift data into the Boundary Scan test data register through TDI using the Shift-DR state. BYPASS. When the BYPASS instruction is latched into the Instruction register, TDI connects to TDO through the 1-bit Bypass test data register. This allows data to pass from TDI to TDO without affecting the device’s normal operation. EXTEST. This instruction allows testing of all interconnections to the device. When the EXTEST instruction is latched in the Instruction register, the following actions occur. Once enabled through the Update-IR state, the parallel outputs of all digital output pins are driven. The Boundary Scan test data register is connected between TDI and TDO. The Capture-DR samples all digital inputs into the Boundary Scan test data register. Table 2. Instruction Codes INSTRUCTION SELECTED REGISTER INSTRUCTION CODE SAMPLE/PRELOAD Boundary Scan 0010 BYPASS Bypass 1111 EXTEST Boundary Scan 0000 CLAMP Bypass 0011 HIGHZ Bypass 0100 IDCODE Identification 0001 ADDRESS Memory Address 1001 READ Memory Read 1010 WRITE Memory Write 1011 ____________________________________________________________________ 11 DS4550 Update-DR. A falling edge on TCK while in the Update-DR state latches the data from the shift register path of the test data registers into a set of output latches. This prevents changes at the parallel output because of changes in the shift register. On the rising edge of TCK, the controller goes to the Run-Test/Idle state if TMS is LOW or it goes to the Select-DR-Scan state if TMS is HIGH. Select-IR-Scan. All test data registers retain their previous state. The Instruction Register remains unchanged during this state. With TMS LOW, a rising edge on TCK moves the controller into the Capture-IR state. TMS HIGH during a rising edge on TCK puts the controller back into the Test-Logic-Reset state. Capture-IR. The Capture-IR state is used to load the shift register in the Instruction Register with a fixed value. This value is loaded on the rising edge of TCK. If TMS is HIGH on the rising edge of TCK, the controller enters the Exit1-IR state. If TMS is LOW on the rising edge of TCK, the controller enters the Shift-IR state. Shift-IR. In this state, the shift register in the Instruction register is connected between TDI and TDO and shifts data one stage for every rising edge of TCK toward the TDO serial output while TMS is LOW. The parallel outputs of the Instruction Register as well as all test data registers remain at their previous states. A rising edge on TCK with TMS HIGH moves the controller to the Exit1-IR state. A rising edge on TCK with TMS LOW keeps the controller in the Shift-IR state while moving data one stage through the Instruction Shift Register. Exit1-IR. A rising edge on TCK with TMS LOW puts the controller in the Pause-IR state. If TMS is HIGH on the rising edge of TCK, the controller enters the Update-IR state. Pause-IR. Shifting of the Instruction shift register is halted temporarily. With TMS HIGH, a rising edge on TCK puts the controller in the Exit2-IR state. The controller remains in the Pause-IR state if TMS is LOW during a rising edge on TCK. DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory CLAMP. All digital outputs of the device output data from the Boundary Scan parallel output while connecting the Bypass test data register between TDI and TDO. The outputs do not change during the CLAMP instruction. HIGHZ. All digital outputs of the device are placed in a high-impedance state. The Bypass test data register is connected between TDI and TDO. IDCODE. When the IDCODE instruction is latched into the parallel Instruction register, the Identification test data register is selected. The device identification code is loaded into the Identification test data register on the rising edge of TCK following entry into the Capture-DR state. Shift-DR can be used to shift the identification code out serially through TDO. During Test-LogicReset, the identification code is forced into the Instruction register. The ID code always has a 1 in the LSB position. The next 11 bits identify the manufacturer’s JEDEC number and number of continuation bytes followed by 16 bits for the device and 4 bits for the version. See the diagram below. ADDRESS. This is an extension to the standard IEEE 1149.1 instruction set to support access to the memory in the DS4550. When the ADDRESS instruction is latched into the Instruction register, TDI connects to TDO through the 8-bit Memory Address test data register during the Shift-DR state. READ. This is an extension to the standard IEEE 1149.1 instruction set to support access to the memory in the DS4550. When the READ instruction is latched into the Instruction register, TDI connects to TDO through the 8-bit Memory Read test data register during the Shift-DR state. WRITE. This is an extension to the standard IEEE 1149.1 instruction set to support access to the memory in the DS4550. When the WRITE instruction is latched into the Instruction register, TDI connects to TDO through the 8-bit Memory Write test data register during the Shift-DR state. When EEPROM writes occur using the JTAG interface, the DS4550 will write the whole EEPROM memory page (8 bytes) even though only a single byte is modified. The unmodified bytes of the page are transparently rewritten to their current values. The DS4550’s EEPROM write cycles are specified in the Nonvolatile Memory Characteristics table. The specification shown is at the worst-case temperature. It is capable of handling many more writes at room temperature. Test Data Registers IEEE 1149.1 requires a minimum of two test data registers; the Bypass Register and the Boundary Scan Register. The optional Identification test data register has been included in the DS4550 design along with three DS4550 specific registers (Address, Read, Write) to support access to the EEPROM. Bypass Register. This is a one-bit shift register used in conjunction with the BYPASS, CLAMP, and HIGHZ instructions. It provides a short path between TDI and TDO. Boundary Scan Register. This register contains both a shift register path and a latched parallel output for all control cells and digital I/O cells. It is 33 bits in length. See Table 3 for the cell bit locations and definitions. Identification Register. The Identification test data register contains a 32-bit shift register and a 32-bit latched parallel output. This register is selected during the IDCODE instruction and when the TAP controller is in the Test-Logic-Reset state. Memory Address Register. This 8-bit register has a latched parallel output that holds the memory address location that is to be read from or written to. This register is selected during the ADDRESS instruction. Memory Read Register. This 8-bit load-only register will latch the 8-bit value from the memory location indicated by the address contained in the Address test data register during the Capture-DR state. The data can then be shifted out the TDO serial output by 8 rising edges of TCK during the Shift-DR state. See Table 4 for a detailed example. Memory Write Register. This 8-bit output-only register will write its 8-bit value to the memory location indicated by the address contained in the Address test data register during the Update-DR state. The data is shifted into the Write test data register through the TDI input with 8 rising edges of TCK during the Shift-DR state immediately prior to the Update-DR state. See Table 5 for a detailed example. 32-Bit ID Code MSB 12 LSB Version (4 Bits) Device ID (16 Bits) Manufacturer ID (11 Bits) Fixed Value (1 Bit) 0000 0001000000000000 00010100001 1 ____________________________________________________________________ I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory CELL NUMBER NAME TYPE 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 A2 input A1 input A0 input SCL input SDA input SDA output IO8 pubout IO8 pdbout IO8 input IO7 pubout IO7 pdbout IO7 input IO6 pubout IO6 pdbout IO6 input IO5 pubout IO5 pdbout Input Observe Only Input Observe Only Input Observe Only Input Observe Only Input Observe Only Output Output Output Input Observe Only Output Output Input Observe Only Output Output Input Observe Only Output Output CELL NUMBER NAME TYPE 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 IO5 input IO4 pubout IO4 pdbout IO4 input IO3 pubout IO3 pdbout IO3 input IO2 pubout IO2 pdbout IO2 input IO1 pubout IO1 pdbout IO1 input IO0 pubout IO0 pdbout IO0 input Input Observe Only Output Output Input Observe Only Output Output Input Observe Only Output Output Input Observe Only Output Output Input Observe Only Output Output Input Observe Only DS4550 Table 3. Boundary Scan Control Bits [33 Bits] Table 4. EEPROM Read Cycle STEP Select Address Register Load EEPROM Address Select Read Register Read EEPROM Data TAP STATE COMMENTS Select-IR-Scan Capture-IR Shift-IR (4 x TCK) The 4-bit instruction is shifted in through TDI. Exit1-IR Update-IR Select-DR-Scan Capture-DR No-op. Shift-DR (8 x TCK) The 8-bit address is shifted in through TDI. Exit1-DR Update-DR The shifted 8-bit Address Register data is output latched. Select-IR-Scan Capture-IR Shift-IR (4 x TCK) The 4-bit instruction is shifted in through TDI. Exit1-IR Update-IR Select-DR-Scan Capture-DR The 8-bit EEPROM data is loaded into the EEPROM Read Register. Shift-DR (8 x TCK) The 8-bit data is shifted out through TDO. Exit1-DR Update-DR No-op. ____________________________________________________________________ 13 DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Table 5. EEPROM Write Cycle STEP Select Address Register Load EEPROM Address Select Write Register Write EEPROM Data TAP STATE COMMENTS Select-IR-Scan Capture-IR Shift-IR (4 x TCK) The 4-bit instruction is shifted in through TDI. Exit1-IR Update-IR Select-DR-Scan Capture-DR No-op. Shift-DR (8 x TCK) The 8-bit address is shifted in through TDI. Exit1-DR Update-DR The shifted 8-bit Address Register data is output latched. Select-IR-Scan Capture-IR Shift-IR (4 x TCK) The 4-bit instruction is shifted in through TDI. Exit1-IR Update-IR Select-DR-Scan Capture-DR No-op. Shift-DR (8 x TCK) The 8-bit data is shifted in through TDI. Exit1-DR Update-DR The shifted 8-bit EEPROM Write Register data is output latched and written to the EEPROM. I2C Serial Interface Description I2C Definitions The following terminology is commonly used to describe I2C data transfers. Master Device: The master device controls the slave devices on the bus. The master device generates SCL clock pulses, start and stop conditions. Slave Devices: Slave devices send and receive data at the master’s request. Bus Idle or Not Busy: Time between stop and start conditions when both SDA and SCL are inactive and in their logic high states. When the bus is idle it often initiates a low-power mode for slave devices. Start Condition: A start condition is generated by the master to initiate a new data transfer with a slave. Transitioning SDA from high to low while SCL remains high generates a start condition. See the timing diagram for applicable timing. 14 Stop Condition: A stop condition is generated by the master to end a data transfer with a slave. Transitioning SDA from low to high while SCL remains high generates a stop condition. See the timing diagram for applicable timing. Repeated Start Condition: The master can use a repeated start condition at the end of one data transfer to indicate that it will immediately initiate a new data transfer following the current one. Repeated starts are commonly used during read operations to identify a specific memory address to begin a data transfer. A repeated start condition is issued identically to a normal start condition. See the timing diagram for applicable timing. Bit Write: Transitions of SDA must occur during the low state of SCL. The data on SDA must remain valid and unchanged during the entire high pulse of SCL plus the setup and hold-time requirements (see Figure 5). Data is shifted into the device during the rising edge of the SCL. ____________________________________________________________________ I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Byte Write: A byte write consists of 8 bits of information transferred from the master to the slave (most significant bit first) plus a 1-bit acknowledgement from the slave to the master. The 8-bits transmitted by the master are done according to the bit write definition and the acknowledgement is read using the bit read definition. Byte Read: A byte read is an 8-bit information transfer from the slave to the master plus a 1-bit ACK or NACK from the master to the slave. The 8 bits of information that are transferred (most significant bit first) from the slave to the master are read by the master using the bit read definition above, and the master transmits an ACK using the bit write definition to receive additional data bytes. The master must NACK the last byte read to terminated communication so the slave returns control of the SDA to the master. Slave Address Byte: Each slave on the I 2 C bus responds to a slave address byte sent immediately following a start condition. The slave address byte contains the slave address in the most significant 7 bits and the R/W bit in the least significant bit. SDA tBUF tHD:STA tLOW tR tSP tF SCL tHD:STA STOP tSU:STA tHIGH tSU:DAT START tHD:DAT REPEATED START tSU:STO NOTE: TIMING IS REFERENCED TO VIL(MAX) AND VIH(MIN) Figure 5. I2C Timing Diagram ____________________________________________________________________ 15 DS4550 Bit Read: At the end a write operation, the master must release the SDA bus line for the proper amount of setup time (see Figure 5) before the next rising edge of SCL during a bit read. The device shifts out each bit of data on SDA at the falling edge of the previous SCL pulse and the data bit is valid at the rising edge of the current SCL pulse. Remember that the master generates all SCL clock pulses including when it is reading bits from the slave. Acknowledgement (ACK and NACK): An Acknowledgement (ACK) or Not Acknowledge (NACK) is always the 9th bit transmitted during a byte transfer. The device receiving data (the master during a read or the slave during a write operation) performs an ACK by transmitting a zero during the 9th bit. A device performs a NACK by transmitting a one during the 9th bit. Timing (Figure 5) for the ACK and NACK is identical to all other bit writes. An ACK is the acknowledgment that the device is properly receiving data. A NACK is used to terminate a read sequence or as an indication that the device is not receiving data. DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory The DS4550’s slave address of the DS4550 is determined by the state of the A0, A1, and A2 address pins as shown in Figure 2. Address pins connected to GND result in a ‘0’ in the corresponding bit position in the slave address. Conversely, address pins connected to VCC result in a ‘1’ in the corresponding bit positions. When the R/W bit is 0 (such as in A0h), the master is indicating it will write data to the slave. If R/W = 1, (A1h in this case), the master is indicating it wants to read from the slave. If an incorrect slave address is written, the DS4550 assumes the master is communicating with another I2C device and ignores the communication until the next start condition is sent. Memory Address: During an I2C write operation, the master must transmit a memory address to identify the memory location where the slave is to store the data. The memory address is always the second byte transmitted during a write operation following the slave address byte. I2C Communication Writing a Single Byte to a Slave: The master must generate a start condition, write the slave address byte (R/W = 0), write the memory address, write the byte of data, and generate a stop condition. Remember the master must read the slave’s acknowledgement during all byte write operations. Writing Multiple Bytes to a Slave: To write multiple bytes to a slave, the master generates a start condition, writes the slave address byte (R/W = 0), writes the memory address, writes up to 8 data bytes, and generates a stop condition. The DS4550 is capable of writing up to 8 bytes (1 page or row) with a single I2C write transaction. This is internally controlled by an address counter that allows data to be written to consecutive addresses without transmitting a memory address before each data byte is sent. The address counter limits the write to one 8-byte page. Attempts to write to additional pages of memory without sending a stop condition between pages results in the address counter wrapping around to the beginning of the present row. The first row begins at address 00h and subsequent rows begin at multiples of 8 there on (08h, 10h, 18h, 20h, etc). To prevent address wrapping from occurring, the master must send a stop condition at the end of the page, and then wait for the bus free or EEPROM write time to 16 elapse. Then the master can generate a new start condition, write the slave address byte (R/W = 0), and the first memory address of the next memory row before continuing to write data. Acknowledge Polling: Any time an EEPROM page is written, the DS4550 requires the EEPROM write time (tWR) after the stop condition to write the contents of the page to EEPROM. During the EEPROM write time, the device does not acknowledge its slave address because it is busy. It is possible to take advantage of this phenomenon by repeatedly addressing the DS4550, which allows communication to continue as soon as the DS4550 is ready. The alternative to acknowledge polling is to wait for a maximum period of tWR to elapse before attempting to access the device. EEPROM Write Cycles: When EEPROM writes occur using the I2C interface, the DS4550 writes the whole EEPROM memory page even if only a single byte on a page was modified. Writes that do not modify all 8 bytes on the page are valid and do not corrupt any other bytes on the same page. Because the whole page is written, even bytes on the page that were not modified during the transaction are still subject to a write cycle. The DS4550’s EEPROM write cycles are specified in the Nonvolatile Memory Characteristics table. The specification shown is at the worst-case temperature. It is capable of handling many more writes at room temperature. Reading a Single Byte from a Slave: Unlike the write operation that uses the specified memory address byte to define where the data is to be written, the read operation occurs at the present value of the memory address counter. To read a single byte from the slave, the master generates a start condition, writes the slave address byte with R/W = 1, reads the data byte with a NACK to indicate the end of the transfer, and generates a stop condition. However, since requiring the master to keep track of the memory address counter is impractical, the following method should be used to perform reads from a specified memory location. Manipulating the Address Counter for Reads: A dummy write cycle can be used to force the address counter to a particular value. To do this, the master generates a start condition, writes the slave address byte (R/W = 0), writes the memory address where it desires to read, generates a repeated start condition, writes the slave address byte (R/W = 1), reads data with ACK or NACK as applicable, and generates a stop condition. ____________________________________________________________________ I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Applications Information Reading Multiple Bytes from a Slave: The read operation can be used to read multiple bytes with a single transfer. When reading bytes from the slave, the master simply ACKs the data byte if it desires to read another byte before terminating the transaction. After the master reads the last byte, it must NACK to indicate the end of the transfer and generate a stop condition. To achieve best results, it is highly recommended that a decoupling capacitor is used on the IC power-supply pins. Typical values of decoupling capacitors are 0.01µF and 0.1µF. Use a high-quality, ceramic, surface-mount capacitor, and mount it as close as possible to the VCC and GND pins of the IC to minimize lead inductance. Power Supply Decoupling TYPICAL I2C WRITE TRANSACTION MSB START 1 LSB 0 1 0 A2 SLAVE ADDRESS* A1 A0 R/W MSB SLAVE ACK b7 LSB b6 READ/ WRITE b5 b4 b3 b2 b1 b0 MSB SLAVE ACK b7 LSB b6 b5 REGISTER ADDRESS b4 b3 b2 b1 b0 SLAVE ACK STOP DATA *THE SLAVE ADDRESS IS DETERMINED BY ADDRESS PINS A0, A1, AND A2. EXAMPLE I2C TRANSACTIONS (WHEN A0, A1, AND A2 ARE CONNECTED TO GND) A0h F2h A) SINGLE BYTE WRITE -WRITE I/O CONTROL 0 REGISTER TO 00h START 1 0 1 0 0 0 0 0 SLAVE 1 1 1 1 0 0 1 0 ACK B) SINGLE BYTE READ -READ I/O STATUS 0 RESISTER START 1 0 1 0 0 0 0 0 SLAVE 1 1 1 1 1 0 0 0 SLAVE ACK ACK A0h F8h A0h C) SINGLE BYTE WRITE -WRITE PULLUP ENABLE 0 REGISTER TO FFh START 1 0 1 0 0 0 0 0 A0h SLAVE 0 0 0 0 0 0 0 0 ACK F0h SLAVE ACK 11110 000 STOP A1h REPEATED START FFh SLAVE 11111111 ACK F2h D) TWO BYTE WRITE -WRITE I/O CONTROL 0 AND I/O CONTROL 1 REGISTERS TO 00h SLAVE SLAVE START 1 0 1 0 0 0 0 0 11110 010 ACK ACK D) TWO BYTE READ -READ I/O STATUS 0 AND I/O STATUS 1 RGISTERS START 1 0 1 0 0 0 0 0 A0h SLAVE ACK F8h SLAVE SLAVE 111 11000 ACK ACK SLAVE ACK 00h 00000000 REPEATED START DATA 1 0 1 0 0 0 0 1 SLAVE ACK MASTER NACK STOP MASTER ACK I/O STATUS 1 I/O STATUS STOP 00h SLAVE ACK 00000000 A1h 1 0 1 0 0 0 0 1 SLAVE ACK SLAVE ACK STOP DATA I/O STATUS 0 DATA MASTER NACK STOP Figure 6. I2C Communication Examples ____________________________________________________________________ 17 DS4550 See Figure 6 for a read example using the repeated start condition to specify the starting memory location. DS4550 I2C and JTAG Nonvolatile 9-Bit I/O Expander Plus Memory Package Information Chip Topology TRANSISTOR COUNT: 21,161 SUBSTRATE CONNECTED TO GROUND For the latest package outline information, go to www.maxim-ic.com/DallasPackInfo. Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time. 18 ____________________Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 © 2004 Maxim Integrated Products Printed USA is a registered trademark of Dallas Semiconductor Corporation. is a registered trademark of Maxim Integrated Products.