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.