4-wire synchronous serial interface


I need to interface an IC with the Arduino. This IC have a "4-wire synchronous serial interface".

The pins are:

  • SCLK: serial bit-clock
  • SDI: serial data in
  • SDO: serial data out
  • CS (negated): chip selection

From the datasheet:

The serial port interface is a “4-wire” synchronous serial communications interface. The interface is enabled to start excepting SCLKs when CS (Chip Select) is asserted (logic 0). SCLK (Serial bit-clock) is a Schmitt-trigger input that is used to strobe the data on SDI (Serial Data In) into the receive buffer and out of the transmit buffer onto SDO (Serial Data Out).

If the serial port interface becomes unsynchronized with respect to the SCLK input, any attempt to clock valid commands into the serial interface may result in unexpected operation. Therefor, the serial port interface must then be re-initialized by one of the following actions:

  • Drive the CS (negated) pin high, then low.
  • Hardware Reset (drive RESET (negated) pin low for at least 10 ?s).
  • Issue the Serial Port Initialization Sequence, which is 3 (or more) SYNC1 command bytes (0xFF) followed by one SYNC0 command byte (0xFE).

If a re-synchronization is necessary, it is best to re-initialize the part either by hardware or software reset (command 0x80), as the state of the part may be unknown.

How can I do this interface? I never used SPI but after reading about it I think SPI and this comm above are the same thing, right?

PS: I am using an old Seeeduino (Duemilanove compatible) and I am waiting for my Mega 2560 arrive.

Sorry about the creep english.

Your device may work fine on SPI. Some devices use message sizes that are not an even multiple of 8 bits and those don’t always work well with SPI.

MOSI → SDI (MasterOut/SlaveIn → Serial Data In)
MISO ← SDO (MasterIn/SlaveOut ← Serial Data Out)
SCK → SCLK (SerialClocK → Serial bit-clock)
SS → CS (SlaveSelect → Chip Select)

Read about the SPI library: http://arduino.cc/en/Reference/SPI

I need to interface an IC with the Arduino.

A link to the datasheet of that chip maybe allow us to help you further.