2002NOV12_MPR_AN01

download 2002NOV12_MPR_AN01

of 4

Transcript of 2002NOV12_MPR_AN01

  • 8/8/2019 2002NOV12_MPR_AN01

    1/4

    COMMUNICATION ICs

    Application Note

    C-BUS

    Microcontroller Interface

    2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830144.001

    4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All Trademarks and service marks are held by their respective companies.

    C-BUS Microcontroller Interface

    This document is meant to serve as a definition and introduction to the C-BUS interface. Timing parameterswith wide applicability to MX-COM products are discussed in this application note. For detailed informationconcerning specific signal timing requirements, please refer to the respective MX-COM device data bulletin.For any questions on this material or on any MX-COM product, please contact MX-COM directly at 800-638-5577 or by email at [email protected].

    C-BUS is the name given to the synchronous serial microcontroller (C) interface developed by MX-COM.This interface is compatible with most common serial C interfaces and may also be easily implemented withgeneral purpose C I/O pins controlled by a simple software routine.

    The C-BUS hardware interface consists of five lines:- SERIAL CLOCK: this is the timing source used by the C to control communications with the

    MX-COM device. All C-BUS commands and data transfers are synchronized, in bursts of 8 bits, tothis clock signal.

    - COMMAND DATA:used to transfer register addresses and device configuration data from the hostC to the selected MX-COM device.

    - REPLY DATA:used to transfer requested data from the MX-COM device to the host C. Reply Datais only available if a command (request) is first sent to the MX-COM device on the Command Dataline.

    - CHIP SELECT (/CS): active low signal to the MX-COM device that initiates, completes, or aborts allC-BUS sequences.

    - INTERRUPT REQUEST (/IRQ); active low signal that indicates when the MX-COM device is in needof servicing.

    Most MX-COM devices transfer data in 8 bit bursts across the C-BUS interface. (The CMX264, however,uses an 11 bit burst.) A data transfer requiring more data than can be contained in an 8 bit burst is completedusing multiple 8 bit bursts. A complete data transfer, also called a transaction, is composed of all actions that

    occur between /CS (Chip Select) falling and rising transitions. This document describes 8-bit-burst C-BUStransactions, as well as the 11 bit transactions used in the CMX264. Example C-BUS timing diagrams areincluded at the end of this document.

    Chip Select (/CS, CSN)/CS is taken low to start a transaction and should not be taken high until the transaction is completed. If /CS istaken high during a transaction, that transaction is aborted. The /CS signal must be held low during datatransfers and kept high between transfers.

    During a single C-BUS transaction, only one register can be written to or read from. Multiple register readscan not be performed during a single /CS active period (e.g. taking /CS low, writing to multiple registers,reading from multiple registers, and then taking /CS back high; this will cause erroneous operation).

    Once a C-BUS transaction is complete, the /CS signal must be taken to a high logic level and kept at a highlogic level for a prescribed amount of time before the next transaction can begin. This parameter is typicallyreferred to as tCSOFF (/CS-High Time Between Transactions) in MX-COM product literature.

    Serial ClockThe timing signal for data transfer between the C and the MX-COM device is provided on this line. Data istransferred to and from the MX-COM device on the rising edge of the Serial Clock signal. The Serial Clockrate should be harmonically related to (Crystal/Serial Clock) = 32, as a Serial Clock signal of this frequency will

  • 8/8/2019 2002NOV12_MPR_AN01

    2/4

    C-BUS Microcontroller Interface 2 Application Note

    2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830144.001

    4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All Trademarks and service marks are held by their respective companies.

    typically not create aliasing effects. Allowable Serial Clock speeds vary from device to device; please refer tothe specific MX-COM data bulletin for more information.

    C-BUS data must be stable for a minimum amount of time before the rising edge of the Serial Clock signal;this amount of time is typically referred to as tCDS (Command Data Set-Up Time). Similarly, there is aminimum time requirement for which the data signal must be stable after the Serial Clock signal rising edge;this parameter is frequently referred to as tCDH (Command Data Hold Time) in MX-COM product literature.The Serial Clock signal can be asymmetric (i.e. non-50% duty cycle).

    There is a minimum amount of time required between the falling edge of the /CS signal and the first SerialClock rising edge used to strobe in data. This parameter is typically referred to as tCSE (/CS Enable to ClockHigh Time). The minimum time duration between the last rising Serial Clock edge used to strobe in data andthe rising edge of the /CS signal is labeled tCSH (Last Clock High to /CS High Time) in the MX-COM literature.

    Command DataRegister addresses and write register contents (e.g. register configuration settings) are transferred seriallyfrom the Cto the MX-COM device on this line. Some instructions do not have data associated with thecommand (i.e. the General Reset command, which is a single byte C-BUS transaction consisting of $01).

    The first byte that must be transmitted to an MX-COM device in a C-BUS transaction is called anAddress/Command (A/C) byte. The A/C byte, transmitted on the Command Data line, specifies the

    MX-COM device and register to be operated on. An A/C byte can then be followed by one of the following:1) Data bytes from the C (via the Command Data line) to configure the device register for specific

    operation.2) Data bytes from the MX-COM device (via the Reply Data line), such as status register contents.

    In general, all bytes are transmitted most significant bit (msb) first. For multiple byte C-BUS transactions thereis usually a short time period between the bytes transferred in the transaction; this time period is typicallyreferred to as tNXT (Inter-Byte Time).

    Command Data must be valid on the low-to-high transition of the Serial Clock. Consequently, it may beconvenient to configure the software such that the Command Data is changed on the high-to-low transition ofthe Serial Clock.

    Reply DataData is transferred serially from the MX-COM device to the C on this line. Reply Data is only available if acommand (request) is first sent to the MX-COM device on the Command Data line. For multiple byte C-BUStransactions there is usually a short time period between the bytes transferred in the transaction; this timeperiod is typically referred to as tNXT (Inter-Byte Time).

    Reply Data sent from the MX-COM device to the C is valid when the Serial Clock signal is high and may beread into the C on the Serial Clock low-to-high transition.

    Interrupt Request (/IRQ)An interrupt request line is provided to allow indication of a need for device servicing by the host C. The /IRQ

    line is typically connected to VDD via a pull-up resistor; refer to the respective MX-COM device data bulletin forrecommended pull-up resistor values.

    Many MX-COM devices allow the masking of interrupts by the selection of appropriate register bits; pleaserefer to the respective MX-COM device data bulletin for more information.

  • 8/8/2019 2002NOV12_MPR_AN01

    3/4

    C-BUS Microcontroller Interface 3 Application Note

    2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830144.001

    4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All Trademarks and service marks are held by their respective companies.

    Examples of C-BUS TransactionsThe examples below describe five transactions for C-BUS. Note that the events between /CS low and /CShigh form one complete transaction.

    a. A single byte C-BUS transfer (e.g. General Reset command):

    1. Take /CS low.2. Send Address / Command byte containing General Reset command on Command Data line.3. Take /CS high.

    b. A two-byte C-BUS transfer to the MX-COM device (e.g. to set up a control register):

    1. Take /CS low.2. Send Address / Command byte (containing desired register) on Command Data line.3. Send data byte (register configuration byte) on Command Data line.4. Take /CS high.

    c. A three-byte C-BUS transfer to the MX-COM device (e.g. to set up a data word register):

    1. Take /CS low.2. Send Address / Command byte (containing desired register).3. Send first data byte (half of data word).4. Send second data byte (remainder of data word).5. Take /CS high.

    Single byte from C:

    Data to MX-COM device

    One Address and one Data byte from C:

    MSB to MX-COM device LSB to MX-COM device

    One Address and 2 Data bytes from C:

    /CS

    /CS

    /CS

  • 8/8/2019 2002NOV12_MPR_AN01

    4/4