MAX6954: Anyone Have Any Luck With Inferfacing With Arduino?

Hi everyone! I was also trying to get the MAX6954 working on the Arduino. Especially on the Arduino Due. To me it seems to be impossible with the builtin SPI routines. In the following example, the very first command being sent is fine (switching on the display test mode) but the next one is not accepted anymore:

#include <SPI.h>

// SPI on Arduino Due:   MOSI    MISO    SCK     SS
//                       ICSP-4  ICSP-1  ICSP-3  4,10,52
#define CS   52

void setup() {
  SPI.begin(CS);
  SPI.setClockDivider(CS, 84);
  SPI.setBitOrder(MSBFIRST);
  SPI.setDataMode(SPI_MODE0);
  
  // Enabling Display Test Mode
  SPI.transfer(CS, 0x07, SPI_CONTINUE);
  SPI.transfer(CS, 0x01);

  // Disabling Display Test Mode
  SPI.transfer(CS, 0x07, SPI_CONTINUE);
  SPI.transfer(CS, 0x00);
}

void loop() {
}

I think the reason is the strange timing behaviour of the chip. The MAX6954 expects the CLK to be low before CS goes low but afterwards the CLK should be high before CS goes high (see it's datasheet). That's just strange. I attached a measurement done with my Open Bench Logic Sniffer logic analyzer. It shows the behaviour of the code above. It reveals that the CLK is low when when CS changes to low as well as when CS changes to high as you would expect for a normal SPI device.

I don't want to implement the device using bit-banging. I'll check out the MAX6955 (which doesn't come as DIP :frowning: ) and try to use its I2C bus.

I don't understand how Anthony DiGirolamo got it working with the Arduino (see [1] and [2]) (without implementing bit-banging mode!).

Here are links to similar problems: A discussion also describing the timing problem and some PIC code for the MAX6954 obviously also non-working.

SPI-Bus-MAX6954_0x07-0x01.png