iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 1/26 FEATURES APPLICATIONS Ë Ë Ë Ë Ë Ë Ë Ë Ë Ë Ë Ë Ë Bidirectional BiSS sensor communication with up to 3 slaves Supports SSI protocol for unidirectional communication Synchronous sensor data acquisition with cyclic transfer at data rates of up to 10 Mbit/s Command and slave register operations during cyclic data transfers Data lengths of up to 64 bits for sensor data, independently scalable for each slave Automatic compensation of line delays, measurement and conversion times Data verification by CRC polynomials of up to 8 bits, adjustable per slave Separate memory banks enable free controller access during BiSS sensor data transfers 32 bytes of intermediate memory to ease bidirectional slave register communications Parallel controller interface with an 8-bit data/address bus services Intel and Motorola devices Serial controller communication by SPITM-compatible mode Single 3 to 5V supply, industrial temperature range Ë Ë Bidirectional device communication in multisensor systems Position measurement with linear or angular encoders Drive systems (motor feedback) PACKAGES TSSOP24 BLOCK DIAGRAM SPI is a trademark of MOTOROLA, Inc. Copyright © 2003, 2009, iC-Haus www.ichaus.com iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 2/26 DESCRIPTION iC-MB3 is a single-chip BiSS/SSI interface controller featuring an 8-bit bus interface to industrial standard microcontrollers. An additional SPI interface mode also enables serial communication between iC-MB3 and the connected microcontroller. One to three BiSS devices can be attached to the sensor side of the device. These are connected up to clock line MA1 and data return line SL1 using RS422 transceivers (Figure 1). The BiSS devices can be connected directly in noise-free environments. A maximum of three BiSS slaves is supported, each with their own independently scalable data sections encompassing: 1) Sensor data from 0 to 64 bits (for measurement data, alarms and warnings) 2) Register data with 128 bytes per slave ID (e.g. for device parameters). iC-MB3 provides dual RAM memory banks for each slave, enabling flexible access of the microcontroller while new sensor data is being read in. A 32-byte intermediate memory supports register transfers. Sensor data acquisition is started by a microcontroller command or via pin GETSENS. Alternatively, iC-MB3 can also read in new sensor data automatically; the cycle time in this instance can be set as required. The end of sensor data acquisition and readin is signaled at pin EOT by a high; if faults occur during transmission pin NER signals a low. Errors in communication can be verified by the microcontroller via a status register; a system error message can also enter this register if bidirectional message pin NER is kept low by external intervention. iC-MB3 generates a clock signal for sensor communication using an internal 20 MHz oscillator. The clock can also be supplied externally. Figure 1: Point-to-point connection of iCFigure 2: Example network of iC-MB3 and three subscribers. All MB3 and one bus subscriber. This can use 1 8 possible slave IDs (SIDs) are used distributed. to 8 slave IDs (SID). iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 3/26 PACKAGES TSSOP24 to JEDEC Standard PIN CONFIGURATION TSSOP24 4.4 mm, lead pitch 0.65 mm (top view) PIN FUNCTIONS No. Name Function 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 NCS ALE-SCLK DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 GND VDD EOT GETSENS NER MA1 SL1 INT_NMOT CFGSPI Chip Select Input, low active Address Latch Enable Input Data Bus Data Bus Data Bus Data Bus Data Bus Data Bus Data Bus Data Bus Ground +3.3 ... +5V Supply Voltage End-Of-Transmission Output Sensor Data Request Input Error Message Input/Output, low active BiSS Clock/Data Line Output BiSS Data Line Input Mode Select (Intel = 1, Motorola = 0)* Serial/Parallel Mode Select Input (serial SPI = 1, parallel = 0) NRES Reset Input, low active CLK External Clock Input CLKOUT** Clock Output NWR_E Write Input, low active (Intel) Enable Input, high active (Motorola) NRD_RNW Read Input, low active (Intel) Read/Not-Write Select Input (Motorola) Serial SPI Communication Mode (CFGSPI = 1): 1 NCS Chip Select Input, low active 2 SCLK SPI Clock Input 3 SI SPI Serial Data Input 4 SO SPI Serial Data Output * only when CLKENI = 1 else no signal ** on SPI no effect iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 4/26 ABSOLUTE MAXIMUM RATINGS Values beyond which damage may occur; device operation is not guaranteed. Item Symbol Parameter Conditions Fig. Unit Min. Max. G001 VDD Supply Voltage VDD -0.3 6 V G002 I(VDD) Current in VDD -20 30 mA G003 V() Voltage at all pins, excluding VDD and GND -0.3 6 V G004 I() Current in all pins excluding VDD and GND -10 10 mA E001 Vesd() ESD Susceptibility at all pins 2 kV V()# VDD + 0.3 V HBM, 100 pF discharged through 1.5 kS TG1 Tj Operating Junction Temperature -40 150 °C TG2 Ts Storage Temperature Range -40 150 °C THERMAL DATA Operating Conditions: VDD = 3 ... 5 V Item Symbol Parameter Conditions Fig. Unit Min. T1 Ta Operating Ambient Temperature Range (extended range to -40 °C is available on request) All voltages are referenced to ground unless otherwise noted. All currents into the device pins are positive; all currents out of the device pins are negative. -25 Typ. Max. 85 °C iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 5/26 ELECTRICAL CHARACTERISTICS Operating Conditions: VDD = 3 ... 5.5 V, Tj = -25 ... +125 °C, unless otherwise noted Item Symbol Parameter Conditions Tj °C Fig. Unit Min. Typ. Max. Total Device 001 VDD Permissible Supply Voltage 3 002 I(VDD) Supply Current in VDD outputs not loaded, f(CLK) = 20 MHz 003 Vc()hi Clamp Voltage hi at all pins excluding VDD, GND Vc()hi = V() - VDD, I() = 1 mA; outputs tristate 004 Vc()lo Clamp Voltage lo at all pins excluding VDD, GND I() = -1mA; outputs tristate 5.5 V 20 mA 0.3 1.6 V -1.6 -0.3 V Control Interface: EOT, NER, GETSENS 201 Vs()hi Saturation Voltage hi at EOT Vs()hi = VDD - V(); I() = -4 mA VDD = 3 V; I() = -2 mA 400 400 mV mV 202 Vs()lo Saturation Voltage lo at EOT, NER I() = 4 mA VDD = 3 V, I() = 2 mA 420 420 mV mV 203 Vt()hi Threshold Voltage hi at NER, GETSENS 2 V 204 Vt()lo Threshold Voltage lo at NER, GETSENS VDD = 3 V 205 Vt()hys Threshold Voltage Hysteresis at NER, GETSENS 206 Ipu() Pull-Up Current at NER vs. VDD 207 Ipd() Pull-Down Current at GETSENS V() = 1.5 V ... VDD vs. GND 0.8 0.4 V V 300 500 -600 -300 -60 µA 4 35 70 µA Vs()hi = VDD - V(); I() = -4 mA VDD = 3 V, I() = -2 mA 400 400 mV mV I() = 4 mA VDD = 3 V, I() = 2 mA 420 420 mV mV 2 V V() = 0 ... VDD - 1.5 V mV BiSS Interface: MA1, SL1 301 Vs(MA1)hi Saturation Voltage hi 302 Vs(MA1)lo Saturation Voltage lo 303 Vt(SL1)hi Threshold Voltage hi 304 Vt(SL1)lo Threshold Voltage lo VDD = 3 V 305 Vt(SL1)hys Threshold Voltage Hysteresis 306 Ipu(SL1) Pull-Up Strom vs. VDD V() = 0 ... VDD - 1.5 V 0.8 0.4 V V 300 500 -70 -35 mV -5 µA µC Interface: bidirectional data bus DB7 ... 0, Inputs NWR_E, NRD_RNW, NCS, ALE, INT_NMOT, CFGSPI 401 Vs()hi Saturation Voltage hi at DB7...0 Vs()hi = VDD - V(); I() = -4 mA VDD = 3 V, I() = -2 mA 400 400 mV mV 402 Vs()lo Saturation Voltage lo at DB7...0 I() = 4 mA VDD = 3 V, I() = 2 mA 420 420 mV mV 403 Vt()hi Threshold Voltage hi 2 V 404 Vt()lo Threshold Voltage lo VDD = 3 V 405 Vt()hys Threshold Voltage Hysteresis 406 Ipd() Pull-Down Current at DB7...0, ALE, CFGSPI, INT_NMOT to GND V() = 1.5 V ... VDD 407 Ipu() Pull-Up Current at NRD_RNW, NWR_E, NCS vs.VDD V() = 0 ... VDD - 1.5 V 0.8 0.4 V V 300 500 mV 4 35 70 µA -70 -35 -4 µA iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 6/26 ELECTRICAL CHARACTERISTICS Operating Conditions: VDD = 3 ... 5.5 V, Tj = -25 ... +125 °C, unless otherwise noted Item Symbol Parameter Conditions Tj °C Fig. Unit Min. Typ. Max. 20 25 Oscillator: CLK, CLKOUT 501 f(CLK) Permissible Clock Rate at CLK 502 f(CLKOUT) Oscillator Clock Frequency VDD = 5 V, CLKENI = 1 20 503 Vt(CLK)hi Threshold Voltage hi MHz 2 504 Vt(CLK)lo Threshold Voltage lo VDD = 3 V 505 Vt(CLK)hys Threshold Voltage Hysteresis V() = 1.5 V ... VDD MHz 0.8 0.4 V V V 300 500 4 35 mV 506 Ipd() Pull-Down Current at CLK 70 µA 507 Vs()hi Saturation Voltage hi at CLKOUT Vs()hi = VDD- V(); I()= -4 mA VDD = 3 V, I() = -2 mA 400 400 mV mV 508 Vs()lo Saturation Voltage lo at CLKOUT I() = 4 mA VDD = 3 V, I() = 2 mA 420 420 mV mV 509 Isc()hi Short-Circuit Current hi at CLKOUT V() = 0 510 Isc()lo Short-Circuit Current lo at CLKOUT V() = VDD -30 -12 -4 mA 5 23 50 mA Reset: NRES 601 VDDoff Undervoltage Reset VDD decreasing 1.6 V 602 VDDon Undervoltage Release VDD increasing 1.75 V 603 VDDhys Undervoltage Hysteresis VDDhys = VDDon - VDDoff 100 604 Vt()hi Threshold Voltage hi 605 Vt()lo Threshold Voltage lo VDD = 3 V 606 Vt()hys Threshold Voltage Hysteresis 607 Ipd() Pull-Down Current 608 td()res Required Reset Pulse Duration at NRES mV 2 V() = 1.5 V ... VDD 0.8 0.4 V V 300 500 4 35 250 V mV 70 µA ns iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 7/26 OPERATING REQUIREMENTS: µC Interface, INTEL mode Operating conditions: CFGSPI = 0, INT_NMOT = 1 VDD = 3 ... 5.5V, Ta = -25 ... 85 °C; input levels lo = 0 ... 0.45 V, hi = 2.4 V ... VDD Item Symbol Parameter Conditions Fig. Unit Min. Max. I01 tsAA Setup Time: Address stable before ALE hi6lo 3/4 15 ns I02 tAh Signal Duration: ALE at high level 3/4 10 ns I03 tsCA Setup Time: NCS hi6lo until ALE hi6lo 3/4 10 ns l04 thAA Hold Time: Address stable after ALE hi6lo 3/4 15 ns l05 tsAW Setup Time: ALE hi6lo until NWR_E hi6lo 3 0 ns l06 tWl Signal Duration: NWR_E at low level 3 10 ns l07 tsDW Setup Time: Data stable before NWR_E lo6hi 3 15 ns l08 thWD Hold Time: Data stable after NWR_E lo6hi 3 0 ns l09 thWC Hold Time: NCS lo after NWR_E lo6hi 3 0 ns l10 thWA thRA Hold Time: ALE lo after NWR_E lo6hi 3/4 15 ns l11 tsAR Setup Time: ALE hi6lo until NRD_RNW hi6lo 4 0 ns l12 tRl Signal Duration: NRD_RNW at low level 4 70 ns l13 tpRD1 Propagation Delay: Data stable after NRD_RNW hi6lo 4 0 25 ns l14 tpRD2 Propagation Delay: Data Bus high impedance after NRD_RNW lo6hi 4 0 25 ns Figure 3: Write cycle (Intel Mode) NCS = lo Figure 4: Read cycle (Intel Mode) iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 8/26 OPERATING REQUIREMENTS: µC Interface, MOTOROLA mode Operating conditions: CFGSPI = 0, INT_NMOT = 0 VDD = 3 ... 5.5V, Ta = -25 ... 85 °C; input levels lo = 0 ... 0.45 V, hi = 2.4 V ... VDD Item Symbol Parameter Conditions Fig. Unit Min. Max. I20 tsAA Setup Time: Address stable before ALE hi6lo 5/6 15 ns I21 tAh Signal Duration: ALE at high level 5/6 10 ns I22 tsCA Setup Time: NCS hi6lo until ALE hi6lo 5/6 10 ns l23 thAA Hold Time: Address stable after ALE hi6lo 5/6 15 ns l24 tsAE Setup Time: ALE hi6lo until NWR_E lo6hi 5/6 0 ns l25 tsRE Setup Time: NRD_RNW lo6hi until NWR_E lo6hi 5/6 0 ns l26 tEh Signal Duration: NWR_E at high level 5/6 10 ns l27 tsDE Setup Time: Data stable before NWR_E hi6lo 5 15 ns l28 thED Hold Time: Data stable before NWR_E hi6lo 5 0 ns l29 thEC Hold Time: NCS lo after NWR_E hi6lo 5/6 0 ns l30 thER Hold Time: NRD_RNW lo after NWR_E hi6lo 5/6 0 ns l31 tpED1 Propagation Delay: Data stable after NWR_E lo6hi 6 0 25 ns l32 tpED2 Propagation Delay: Data bus high impedance after NWR_E hi6lo 6 0 25 ns l33 thEA Hold Time: NWR_E hi6lo before ALE lo6hi 5/6 0 Figure 5: Write cycle (Motorola Mode) NCS = lo Figure 6: Read cycle (Motorola Mode) ns iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 9/26 OPERATING REQUIREMENTS: µC Interface, SPI mode Operating conditions: CFGSPI = 1 VDD = 3 ... 5.5V, Ta = -25 ... 85 °C; input levels lo = 0 ... 0.45 V, hi = 2.4 V ... VDD Item Symbol Parameter Conditions Fig. Unit Min. Max. l40 tsCCL Setup Time: NCS hi6lo until SCLK/ALE lo6hi 0.29 10 ns l41 tsDCL Setup Time: SI/DB0 stable before SCLK/ALE lo6hi 0.29 15 ns l42 thDCL Hold Time: SI/DB0 stable after SCLK/ALE lo6hi 0.29 0 ns l43 tCLh Signal Duration SCLK/ALE hi 7a/b 10 ns l44 tCLl Signal Duration SCLK/ALE lo 7a/b 10 ns l45 thCLC Hold Time: NCS lo after SCLK/ALE lo6hi 7a/b 0 ns l46 tCSh Signal Duration NCS hi 7a/b 0 ns l47 tpCLD Propagation Delay: SO/DB1 stable after SCLK/ALE hi6lo 7b 0 25 ns l48 tpCSD Propagation Delay: SO/DB1 high impedance after NCS lo6hi 7b 0 25 ns Figure 7: µC interface in SPI mode with write cycle (top) and read cycles (bottom). iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 10/26 OPERATING REQUIREMENTS: BiSS Interface Operating conditions: Register bit SELSSI = 0 VDD = 3 ... 5.5 V, Ta = -25 ... 85 °C; input levels lo = 0 ... 0.45 V, hi = 2.4 V ... VDD Item Symbol Parameter Conditions Fig. Unit Min. Max. 2 320 Sensor Mode l60 TMAS Clock Period FreqSens via FREQ(4:0) selected in accordance with table on page 17 8 1/f(CLK) l61 tMASl Clock Signal Lo Level Duration 8 50 % TMAS l62 tMASh Clock Signal Hi Level Duration 8 50 % TMAS l63 tpLine Permissible Line Delay l64 ªtpL Permissible Propagation Delay of Subsequent Clock Cycles vs. 1st Clock Cycle l65 Ttos Permissible Timeout (Slave) 8 ªtpL = max(|tpLine - tpLx|); x= 1 ... n 0 indefinite 8 25 8 55 9 2 % TMAS % TMAS Register Mode* l65 TMAR Clock Period FreqReg via FREQ(7:5) selected in accordance with table on page 17 l66 tMA0h “Logic 0" Hi Level Duration 9 25 l67 tMA1h “Logic 1" Hi Level Duration 9 75 % TMAR l68 tMAth Clock Signal Hi Level Duration 9 50 % TMAR l69 tsSL Setup Time: SL1 stable before MA1 lo6hi 9 30 ns l70 thSL Hold Time: SL1 stable before MA1 lo6hi 9 20 ns register data readout 256 TMAS % TMAR l71 Ttor Permissible Timeout (Slave) 9 80 % TMAR *) For clocking to occur in register mode the slaves must have signaled that they are ready for register mode communication (see page 17). Figure 8: Timing diagram of sensor mode Figure 9: Timing diagram of register mode Evaluating SL1 Signals In BiSS mode delay times of longer than one clock cycle are permissible, with the result that line delays during communication are negligible. Evaluation of the sensor response is delayed until the first falling edge at SL1 while at MA1 the clock signal continues to be output. Within one MA1 clock cycle four equally distributed sampling instances are available. Following the falling edge at SL1, the slave's acknowledge signal, the SL1 level is evaluated two sampling instances on, close to the center of the transmitted bit. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 11/26 OPERATING REQUIREMENTS: BiSS Interface (SSI mode) Operating conditions: Register bit SELSSI = 1; VDD = 3 ... 5.5 V, Ta = -25 ... 85 °C; input levels lo = 0 ... 0.45 V, hi = 2.4 V ... VDD Item Symbol Parameter Conditions Fig. Unit Min. Max. 2 320 l80 TMAS Clock Period l81 tMASh Clock Signal Hi Level Duration 10 50 %TMAS l82 tMASl Clock Signal Lo Level Duration 10 50 %TMAS l83 tsDC Setup Time: SL1 stable before MA1 lo6hi 10 30 ns l83 thDC Hold Time: SL1 stable before MA1 lo6hi 10 10 ns FreqSens über FREQ(4:0) selected in accordance with table on page 17 10 1/f(CLK) Figure 10: Timing diagram of SSI mode. Evaluating SL1 Signals In BiSS interface SSI mode SL1 values are sampled with the rising edge at MA1. An overall delay of the sensor response to the clock at MA1, caused by process times in the sensor or transmission times, is permissible up to the length of one clock cycle. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 12/26 DESCRIPTION OF FUNCTIONS iC-MB3 must be configured in accordance with the sensors connected to it; to this end a special area of memory has been included in the device. The other memory banks are used for the interim storage of incoming slave data or of slave data yet to be transmitted. iC-MB3's second main component is its logic blocks which enable communication with the controller and generate the BiSS interface protocol on the slave side of the chip. Microcontroller Interface Via pins CFGSPI and INT_NMOT iC-MB3 can be configured for operation with an SPI-competent microcontroller, an Intel 8051 controller or a 68HC11 Motorola controller. Here, 8-bit multiplex mode is used, in which the bidirectional data bus alternately transmits addresses and data in blocks of 8 bits (see Figures 3 to 6). Communication Modes CFGSPI 0 0 1 INT_NMOT 0 1 - Mode Motorola 68HC11 Intel 8051 SPI Figure 11: Wiring diagram for the microcontroller and iC- MB3. (polarity= 0, phase= 0) When operated in conjunction with an SPI controller pin ALE is used as a clock input (SCK) and pin NCS as an enable input (NCS), with DB0 as the data input (SI) and DB1 as the data output (SO). Data is transmitted serially in successive blocks of 8 bits (command, address and data). Four commands are available. These are WriteData (0000 0010b), ReadData (0000 0011b), ReadStatus (0000 0101b) and WriteInstruction (0000 0111b). The first two commands can be used to write data to or read data from iC-MB3's registers. The latter two commands are truncated write and read commands where the start address is fixed (namely that of the command register to address 244 and that of the status register to address 240). This means that it is not necessary to give an address, with the data directly adhering to the command. With all commands it is possible to transmit several bytes of data consecutively if the NCS signal is not reset and ALE/SCK continues to be clocked. The address transmitted (240 for ReadStatus and 244 for WriteInstruction) is then the start address which is internally increased by 1 following each transmitted byte. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 13/26 Figure 12: SPI transmission protocol (polarity 0, phase 0) iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 14/26 BiSS(SSI) Interface Configurations Device Registers Address1) 00 ... 63 64 ... 127 128 ... 191 192 ... 223 224 ... 229 230 ... 239 240 ... 255 1) 2) Description Sensor Data - 64 bits per Slave Slave 1 Slave 2 Slave 3 Addresses 07...00; Addresses 15...08; Addresses 23...16; lowest byte in Adr. 00 lowest byte in Adr. 08 lowest byte in Adr. 16 reserved 159 ... 128: Register Data (32 bytes) 191 ... 160: reserved for additional register data Slave Configuration Data - 32 bits per Slave Slave 1 Slave 2 Slave 3 Addresses 195...192 Addresses 199...196 Addresses 203...200 Dir.2) in/out Adr. 63...24 reserved for slaves 4...8 bidir in Adr. 223...204 reserved for slaves 4...8 Configuration of Register Communication Configuration of Master Status information and command register All addresses are decimals unless otherwise stated. Direction in: Can only be written to by the µC out: Can be read out only by the µC in/out: Sections can be written to by the µC in part and only be read out in part bidir: Can be written to and read out by the µC Reserved address range for other master devices. in in in/out iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 15/26 Sensor Data, Multicycle Data and Slave Configuration Address Description SL2 SL3 15 23 ... ... Sensor Data - SDATA(63...0) 08 16 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Configuration Sensor Data 192 196 200 ACTnSENS ENSENS SDLEN(5:0) Sensor CRC 193 197 201 INVCRCS SENSCRCPOLY(7:1) 194 198 202 Data Conversion 0x00, GRAY= 0: no conversion, for incoming data in binary format SL1 07 ... 00 Bit 1 Bit 0 0x80, GRAY= 1: Gray-to-binary conversion, for incoming data in Gray code 195 199 203 reserved 0x00 Key to the configuration bits: S S S S S ACTnSENS ENSENS: SDLEN: INVCRCS: SENSCRCPOLY: Access to slave data: Read (0), Write (1) Adaptation to slave sensor data: available (1), not available (0) Bit length of sensor data 1) Transmission of CRC bits for sensor data: inverted (1), not inverted (0) CRC polynomial for verification of sensor data 2) S GRAY Gray/binary data conversion of sensor (required for SSI encoders) 1) The length of the data should be given minus 1, i.e. for 64 data bits enter 63. If 0000 0000b is entered as the CRC polynomial, no cyclic redundancy check is carried out. As the last bit of a CRC polynomial is always 1 this is not entered in the polynomial register but added in the master. A CRC polynomial of up to 8 bits is thus possible. Should the full polynomial length not be required, the polynomial (minus its final 1) must be justified right and the spaces before it filled with zeros. For example, CRC polynomial 10 0011b is stored as 001 0001b. 2) iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 16/26 Configuration Register Communication Address Description Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 224 Not used - - - - - - - - 225 Not used - - - - - - - - 226 Start Address 227 Count Of Bytes 228 Channel Select 229 SlaveID - - - Bit 2 Bit 1 Bit 0 - - - - - - - 0 0 1 0 WNR - REGADR(6:0) - REGNUM(5) REGNUM(4:0) CHSEL(8:1) - REGVERS SLAVEID(2:0) Bit 7 Bit 6 Bit 5 Bit 4 - - - - Configuration Master Address Description 230 Frequency Division 231 Not used 232 Frequency Division AutoGetsens 233 Not used - - - - 234 Revision 0 0 0 0 235 Type Bit 3 FREQ(7:0) - FREQAGS(7:0) Device ID 1000 0011b Configuration Channel 236 237 238 239 Slave Location SLAVELOC(8:1) Mode of Operation SELSSI4 BiSSMOD4 SELSSI3 BiSSMOD3 SELSSI2 BiSSMOD2 SELSSI1 BiSSMOD1 Mode of Operation SELSSI8 BiSSMOD8 SELSSI7 BiSSMOD7 SELSSI6 BiSSMOD6 SELSSI5 BiSSMOD5 - - - - - - - - Not used Key to the configuration bits: S SELSSI: S BiSSMOD: Type of protocol: BiSS (0), SSI (1) BiSS protocol model: BiSS model A or B (0), BiSS-A/S (1) Status Information and Command Register Address Description Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 nERR nWDERR d nSENSERR nREGERR REGEND d EOT Validity Messages 1,2) SVALID4 d SVALID3 d SVALID2 d SVALID1 d Validity Messages 1,2) SVALID8 d SVALID7 d SVALID6 d SVALID5 d 243 Register Messages CDM TIMEOUT REG 2, 4) REGBYTES(5) 244 Command Register BREAK UCREADSENS SWRAMBANK INIT REGCMD GETSENS0 GETSENS1 AGS 245 Control Flages MAv0 MAf0 MAvS MAfS reserved IDDQ 3) IFTEST 3) CLKENI 246 Not used - - - - - - - - 247 Not used - - - - - - - - 248 Channel Status REG4 SL4 REG3 SL3 REG2 SL2 REG1 SL1 249 Channel Status REG8 SL8 REG7 SL7 REG6 SL6 REG5 SL5 - - - - - - - - 240 Status Information 241 242 250...255 1) 2) 3) 4) d Not used REGBYTES(4:0) Reserved addresses for master devices featuring a higher slave or channel count, or more memory for register data. Any attempt to write to this register sets register values to 0. Two memory banks available. iC-Haus device test only, set to 0. For iC-MB3 the register bit REG is equal to REG1. Bit not relevant (don’t care). iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 17/26 Configuration - Master Master Clock The master clock, either generated by the basic clock of the internal 20 MHz oscillator (CLKENI = 1) or by an external clock oscillator (CLKENI = 0) which supplies pin CLK, is set with the aid of the frequency division register (address 230). The clock frequency for both BiSS sensor and SSI modes is set via FREQ(4:0) in accordance with the table on the top right. With an external clock pulse of fCLK = 20 MHz clock frequencies ranging from 62.5 kHz to 10 MHz can thus be selected for sensor data transmission. Both BiSS and SSI devices recognize an idle bus at the end of a transmission cycle via a monoflop timeout elapsing (timeoutSENS, see BiSS protocol). The choice of possible clock frequency is thus limited as the duration of both the high and low level may not exceed the shortest timeout of all of the connected subscribers (slaves). BiSS devices switch to register mode on recognizing that the bus is idle after a high-low transition at the clock input and signal this state back to the master on the data line. The clock frequency in BiSS register mode is set via FREQ(7:5) and can lie within a range of ca. 244 Hz to 5 MHz. Here selection is also limited as with the above; a different monoflop timeout now recognizes the idle bus at the end of the cycle (timeoutREG, see BiSS protocol). Master Clock for BiSS Sensor Mode and SSI (FreqSens) FREQ(3:0) FREQ(4) = 0 FREQ(4) = 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 fCLK/2 fCLK/4 fCLK/6 fCLK/8 fCLK/10 fCLK/12 fCLK14 fCLK/16 fCLK/18 fCLK/20 fCLK/22 fCLK/24 fCLK/26 fCLK/28 fCLK/30 fCLK/32 not permitted fCLK/40 fCLK/60 fCLK/80 fCLK/100 fCLK/120 fCLK140 fCLK/160 fCLK/180 fCLK/200 fCLK/220 fCLK/240 fCLK/260 fCLK/280 fCLK/300 fCLK/320 A combination of FREQ(4) = 1 and FREQ(3:0) = 0 is not permitted; for a clock frequency of fCLK/20 FREQ(4) = 0 and FREQ(3:0) = 9 must be set. Master Clock for BiSS Register Mode (FreqReg) FREQ(7:5) FreqReg 0 1 2 3 4 5 6 7 FreqSens/2 FreqSens/4 FreqSens/8 FreqSens/16 FreqSens/32 FreqSens/64 FreqSens/128 FreqSens/256 Additionally, BiSS devices generally only permit a lower clock frequency (such as 250 kHz maximum, for example) because the clock form has to be evaluated as a PWM signal. Automatic request for sensor data The frequency with which new requests for sensor data are sent to the slaves is set using FREQAGS according to the table on the right. With an external clock of 20 MHz sensor data request cycles ranging from 1 µs to 4 ms are possible. FREQAGS must be set in such a way that the distance between two requests for data is greater than a complete cycle; this consists of the transmission of a request, an acknowledge signal (including any line delays), a start bit (including process times), a register bit (optional), the sensor and CRC bits of each slave and the longest sensor timeout of all the slaves. Automatic Sensor Data Request (FreqAGS) FREQAGS(6:0) FREQAGS(7)= 0 FREQAGS(7)= 1 0 1 2 ... 125 126 127 fCLK/20 fCLK/40 fCLK/60 ... fCLK/2520 fCLK/2540 fCLK/2560 fCLK/625 fCLK/1250 fCLK/1875 ... fCLK/78750 fCLK/79375 fCLK/80000 iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 18/26 DATA STORAGE - Sensor Data So that new sensor data can be read in during controller accesses iC-MB3 has dual memory banks for sensor data. While sensor data is being read into the first RAM, from the second RAM section the controller can read out the sensor data last read in. The relevant sensor data memory banks are swapped over at the end of the readin procedure; this can be prevented by the controller entering the command register bit UCREADSENS. In parallel with this the validity message register (address 241) and bit REG(address 248) are also swapped. Arrangement of sensor data in the RAM The sensor data memory bank has 8 bytes of memory for each slave which can be interpreted as 64 bits of memory in the array xxxxx111b to xxxxx000b. The sensor data is written to memory area [SDLEN - 1:0] with SDLEN marking the length of the relevant data. Should there be room in the available memory for the CRC bits, these are then also stored with the above data at positions [63:63 - (CRCLEN-1)]. Example Slave 2: 20 bits of sensor data, 6 bits of CRC Adr. 07 ... 00: Adr. 15 ... 08: Adr. 23 ... 16: ... => total length of 26 bits Sensor data Slave 1 Sensor data Slave 2 Adr. 15: SensCRC(5:0), not defined, not defined Adr. 14: - not defined Adr. 13: - not defined Adr. 12: - not defined Adr. 11: - not defined Adr. 10: not defined, not defined, not defined, not defined, SensData(19:16) Adr. 9: SensData(15:8) Adr. 8: SensData(7:0) Sensor data Slave 3 DATA STORAGE - register data For the interim storage of register information read out from or to be written to the slaves iC-MB3 has an individual storage area (addresses 128 to 159) which can temporarily store up to 32 bytes of data. With just one single command this is then transmitted to a slave selected using SLAVEID(2:0) or requested from it as register data. The transmission of register data takes longer than that of sensor data so that the content of the sensor data RAM is then often obsolete. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 19/26 STATUS INFORMATION and COMMAND REGISTER Address 240: Status Messages Bit Designation Function Remarks 7 nERR An error has occurred (low active), equivalent to the pin level at NER (see "Error messaging" on page 22) 6 nWDERR Watchdog error (low active) on - transmissions triggered by an automatic sensor data request - transmissions of register data 5 reserved 4 nSENSERR CRC error in the sensor data (low active) 2 3 nREGERR CRC error during the transmission of register data (low active) 3 2 REGEND End of register data transmission 1 reserved 0 EOT 1 4 4 End of transmission: signals the end of sensor or register data transmission before timed out 1. A watchdog error is triggered during the automatic transmission of sensor data if no new cycle could be initiated; bit AGS in the command register is reset and the automatic request for sensor data aborted. During the transmission of register data a watchdog error is triggered if the slave shows no response, i.e. if it does not answer the first falling master edge with a low or fails to generate a start bit. 2. If a sensor data error is signaled the faulty sensor can be verified by reading out address 241 (validity message). 3. If a register data error is generated the number of bytes transmitted correctly before the error occurred can be determined by reading out the register message REGBYTES (address 243, bits 5...0). In the event of error the transmission of data is terminated. 4. Bit is not relevant (don’t care). Address 241: Validity Messages Bit Designation Function Remarks 7 reserved Not used 1 6 SVALID4 Not used 1 5 reserved Not used 1 4 SVALID3 Readout sensor data from slave 3 valid 1 3 reserved Not used 1 2 SVALID2 Readout sensor data from slave 2 valid 1 1 reserved Not used 1 0 SVALID1 Readout sensor data from slave 1 valid 1 1. Any attempt to write to this register resets the validity messages. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 20/26 Address 243: Register Messages Bit Designation Function 7 CDM TIMEOUT Control data timeout elapsed (1), not elapsed (0) 1 6 REG Current register data bit at the slave operating on BiSS model C 2 5 REGBYTES(5) Not used 4...0 REGBYTES(4:0) Number of register bytes transmitted correctly if an error occurs Remarks 3 1. A new control data communication can only be made once the CDM timeout has elapsed; a new CDM data frame may not be introduced before this time. 2. During the data transmission in BiSS C-Mode protocol, where register data is transmitted together with the sensor data, the current register data bit can be read out via bit REG. Similar to the sensor data this bit also has a second storage section which allows the readout of bits transmitted during the last cycle while a new cycle is running. A swap occurs in parallel with that of the sensor data banks. 3. If no errors occur during transmission these bits are set to 0. Otherwise the number of register bytes successfully transmitted without error is displayed. Address 244: Command Register Bit Designation Function 7 BREAK The current action is aborted (e.g. the clock at MA1 is stopped) 6 UCREADSENS RAM bank swapping is blocked 5 SWRAMBANK All RAM banks and the validity message register are forcibly swapped 4 INIT The sensor is initialized 3 REGCMD Executes transmissions of register data 2 GETSENS0 Single request for sensor data with a high cycle termination (control data bit CDM = 0) 1 GETSENS1 Single request for sensor data with a low cycle termination (control data bit CDM = 1) 0 AGS Start of automatic sensor data requests (AutoGetSens) Remarks All bits with the exception of AGS, UCREADSENS and SWRAMBANK are independently deleted by the master once the command has been carried out. All current actions can be aborted using the BREAK command so that a defined state can be resumed if one of the sensors proves faulty, for example. During the readout of more than one sensor data register by the controller it is possible that the RAM banks in the master could be swapped over once a sensor data transmission is complete. So that the controller only reads related values bit UCREADSENS should be set at the start of the readout and returned at the end; this suppresses the RAM swap. With the start of a new sensor data cycle previous values are then overwritten by the new sensor data. Each setting or deletion of bit SWRAMBANK forces the sensor data banks to be swapped over. Data just input, for example, can then be read out if a cycle has ended during UCREADSENS = 1 (this is indicated by EOT in the status register switching to 1 during the suppression of the RAM swap). iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 21/26 The sensor chain can be initiated using the command INIT. A set REG bit starts the transmission of register data between iC-MB3 and a sensor. The transmission of sensor data can be triggered via bits GETSENS0 and GETSENS1. In both instances a new transmission process is initiated; the difference between the two commands lies in how the transmission cycle is ended. With GETSENS0 the cycle finishes with a high; GETSENS1 ends on a low. When initializing the sensor data transmission via GETSENS0 = 1 and GETSENS1 = 1, the cycle finishes with a level determined by the REG bit entered (Address 243, bit 6), i.e. for REG = 0 with a high or for REG = 1 with a low. By this function register data can be transmitted to slaves operating on the BiSS protocol model C principle in parallel to the transmission of sensor data (see "Transmission of register data in sensor mode"). If an AGS bit has been set sensor data is read in cyclically according to the cycle frequency set in register 232 (FREQAGS) without any further commands being issued by the controller. Registers start address (REGADR, address 226), number of bytes (REGNUM, address 227) and slave ID (SLAVEID, address 229) stipulate from which slave register address onwards how many bytes are to be written to or read out from which specific slave. A byte count of 0 entered for REGNUM signals the transmission of a single register value; a 31 indicates the transmission of 32 register values. In the register REGBYTES (address 243) a 0 is entered if communication has proved error free. In the event of error the number of registers correctly read or written is displayed. iC-MB3 does not support autonomous register communication as with BiSS C.Mode protocol, thus it is imperative that address 229's bit REGVERS remain set to 0. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 22/26 Initialization (for slaves with BiSS B-Mode register communication) To initialize the bus subscribers and to allow them to find their position in the queue (and particularly so that the first slave recognizes its position as such) the master line must be set to 0 after a 1 period (longer than the longest sensor timeout). The slaves themselves signal that initialization has been successful with a 0 on line SL1. During initialization internal counters and error flags in the master are deleted or set as appropriate. Should a slave prove faulty and not switch to 0 initialization must be aborted by a BREAK command. Initialization ends when the CDM timeout flag is set (address 243). Communication in sensor mode The transmission of sensor data begins when at pin MA1 the master outputs the clock signal with the clock frequency selected by FREQ. The line delay, i.e. the transmission propagation until an acknowledgement is generated at SL1, is determined from the second falling edge onwards. While the clock continues to be output at MA1 the master waits for the slaves' start bit (1) signaling the start of data transmission. Following this the actual clocking out of sensor data begins, i.e. the sensors place a new bit on the SL1 line with each rising edge on the MA1 line. The sensor data being input into the master and the ensuing sets of CRC data are written to the appropriate sensor data RAM. At the same time the new CRC value is calculated in accordance with InvSensCRC and using the CRC polynomial stored in the configuration RAM. Should, after entry of the last CRC bit, the system ascertain that transmission was faulty the relevant validity message in address 241 is deleted and error message nSENSERR set in the status register at address 240. At the same time the sensor data RAM banks are swapped. Register communication in BiSS B-Mode Once the slaves have signaled their readiness for register communication (SL1 = 0) the addressing sequence is compiled, consisting of a start bit (1), the slave ID, the register address, the write/read flag, the inverted CRC calculated from this and a stop bit (0). This sequence is then transmitted bit by bit. At the same time the ID distribution among the slaves is checked; should none of the slaves react (should SL1 not signal a 1 after 9 clock pulses) communication is aborted and a register error message generated (nREGERR = 0). The same happens if the slave response is not 0 after the 17th rising edge at MA1. If a register value is to be transmitted to a slave transmission of the new register value begins after 17 clock pulses (i.e. following the transmission of the start bit, slave ID, register address, WNR, CRC and stop bit). This new register value consists of a start bit (1), the new contents of the register, the inverted CRC code and a stop bit (0). At the same time the slave response (SL1) is checked. If the slave does not send a start bit for any reason (if the register addressed does not exist, for example, or access to a write protected register is attempted) communication is aborted after 4,096 MA1 clock pulses and the message nWDERR generated; a register error (nREGERR = 0) is signaled if the CRC proves faulty. If transmission has proved free of error further register values are then compiled as needed and transmitted until communication with the register has ended. If no errors have occurred during communication register 243 then has a value of 0; in the event of error this value is the number of bytes transmitted correctly. When reading out a register value from a slave, following a correct addressing sequence (see above) the system waits while the clock pulse continues to be output at MA1 until the addressed slave sends a start bit. During this waiting period a slave can read out a connected EEPROM, for example, and then transmit this value to the master. Once the slave's start bit has been entered into the master the actual data bits are stored and the CRC carried out on the fly. This cyclic redundancy check operates with the fixed polynomial 10011b and with inverted CRC bits. Should a CRC error occur during transmission this is signaled by a register error; the number of register values transmitted without error is stored in register 243 and further communication aborted. If no errors occur during the transmission of data the next register values can be transmitted from the slave to the master by continued clock pulses at MA1. Register 243 contains a 0 if transmission has proved error free. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 23/26 At the end of communication in register mode the CDM timeout flag is set (address 243). Error messaging In sensor mode the validity of data is stored separately for each slave in the validity message register (address 241). In the event of error the appropriate validity message is deleted and nSENSERR set to 0 in the status register. The error is signaled at pin NER. In register mode a register error (nREGERR = 0) or a slave start signal missed for at least 4,096 MA1 clock pulses results in an error message at NER. As following initialization no valid sensor data yet exists all the bits in the validity message (address 241) are deleted; no display is generated at pin NER, however. A watchdog error is triggered if during the automatic sensor data requests no new readout cycle was able to be initiated. In this instance bit AGS is reset in the command register and the cyclic sensor data requests aborted. A watchdog error is also triggered if a slave response is lacking during the transmission of register data. This has two possible causes; either a slave does not respond to the first falling edge with a low or the slave fails to generate a start bit. It is possible to connect other components to pin NER which can also generate an error message; this can then be read out via bit nERR in the status register at address 240. Register communication in sensor mode (BiSS C-Mode) In the BiSS C-Mode protocol it is possible to send register data to or receive register data from a slave during the cyclic sensor data transmission. In conjunction with iC-MB3 the microcontroller must take care of control data communications, and has to employ GETSENS0 and GETSENS1 to transmit the required CDM data. For register data transmission in the opposite direction, from a sensor to the BiSS master, an additional bit is introduced and filled in by the responding slave before the sensor data. So that the first data bit received is treated as CDS, BiSSMOD1 must be set to 1 (address 237). iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 24/26 APPLICATION HINTS Example system: iC-MB3 with two interpolators iC-NQ Figure 13: Example configuration Figure 14: Example BiSS device description file in XML Assumptions: Sensor 1: iC-NQ with angle resolution 8,192: 13 bit angle data, 2 error bits, CRC polynomial 10 0101b and inverted output, TimeoutSENS: 2,62 µs Sensor 2: iC-NQ with angle resolution 1,024 and period counting: 8 bit period counter data plus 10 bit angle data, 2 error bits, CRC polynomial 10 0101b and an inverted output; TimeoutSENS: 2,62 µs iC-MB3 clock: 20 MHz (according to the electrical characteristics in the data sheet) Setting the master clock for sensor mode: max. 10 MHz Setting the master clock for register mode: max. 250 kHz => FREQ(4:0) = 00000b (10 MHz) => FREQ(7:5) = 101b (156 kHz) Setting the cycle time for the automatic sensor data request: without transmission delays and processing times => cycle time = (3+ (15+6+1) + (20+6+1) ) clock pulses +TimeoutSENS = 52*0,1µs + 2,62µs = 7,82µs .156 * tCLK AutoGetSens time > cycle time => FREQAGS $ 7 iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 25/26 Example system: Required configurations of iC-MB3 Configuration Master Address Description Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 230 Frequency Division 1010 0000b 232 Frequency Division AutoGetsens 0000 0111b Bit 2 Bit 1 Bit 0 Bit 2 Bit 1 Bit 0 Bit 2 Bit 1 Bit 0 Bit 2 Bit 1 Bit 0 Slave Configuration: Slave 1 Address Description Bit 7 Bit 6 192 Sensor data 0 1 193 Sensor-CRC 194 Data Conversion 0x00 195 reserved 0x00 Bit 5 Bit 4 Bit 3 00 1110b 1 001 0010b Slave Configuration: Slave 2 Address Description Bit 7 Bit 6 196 Sensor data 0 1 197 Sensor-CRC 198 Data Conversion 0x00 199 reserved 0x00 Bit 5 Bit 4 Bit 3 01 0011b 1 001 0010b Slave Configuration: Slave 3 Address Description Bit 7 Bit 6 200 Sensor data 0 0 201 Sensor-CRC 202 Data Conversion 0x00 203 reserved 0x00 Bit 5 Bit 4 Bit 3 not relevant not relevant This specification is for a newly developed product. iC-Haus therefore reserves the right to change or update, without notice, any information contained herein, design and specification; and to discontinue or limit production or distribution of any product versions. Please contact iC-Haus to ascertain the current data. Copying -- even as an excerpt -- is only permitted with iC-Haus approval in writing and precise reference to source. iC-Haus does not warrant the accuracy, completeness or timeliness of the specification on this site and does not assume liability for any errors or omissions in the materials. The data specified is intended solely for the purpose of product description. No representations or warranties, either express or implied, of merchantability, fitness for a particular purpose or of any other nature are made hereunder with respect to information/specification or the products to which information refers and no guarantee with respect to compliance to the intended use is given. In particular, this also applies to the stated possible applications or areas of applications of the product. iC-Haus conveys no patent, copyright, mask work right or other trade mark right to this product. iC-Haus assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. As a general rule our developments, IPs, principle circuitry and range of Integrated Circuits are suitable and specifically designed for appropriate use in technical applications, such as in devices, systems and any kind of technical equipment, in so far as they do not infringe existing patent rights. In principle the range of use is limitless in a technical sense and refers to the products listed in the inventory of goods compiled for the 2008 and following export trade statistics issued annually by the Bureau of Statistics in Wiesbaden, for example, or to any product in the product catalogue published for the 2007 and following exhibitions in Hanover (Hannover-Messe). We understand suitable application of our published designs to be state-of-the-art technology which can no longer be classed as inventive under the stipulations of patent law. Our explicit application notes are to be treated only as mere examples of the many possible and extremely advantageous uses our products can be put to. iC-MB3 BiSS INTERFACE MASTER, 1-Chan./3-Slaves Rev D1, Page 26/26 ORDERING INFORMATION Type Package Order designation iC-MB3 TSSOP24 4.4 mm iC-MB3 TSSOP24 Demo Board SPI Demo Board PAR iC-MB3 EVAL MB3D-S iC-MB3 EVAL MB3D-P BiSS PC-LPT Adapter BiSS PC-USB Adapter Please refer to descriptions available separately. For technical support, information about prices and terms of delivery please contact: iC-Haus GmbH Am Kuemmerling 18 D-55294 Bodenheim GERMANY Tel +49-6135-9292-0 Fax +49-6135-9292-192 http://www.ichaus.com E-mail [email protected] Appointed local distributors: http://www.ichaus.de/support_distributors.php