Loading...
Pages: [1]   Go Down
Author Topic: MAX6954: Anyone Have Any Luck With Inferfacing With Arduino?  (Read 319 times)
0 Members and 1 Guest are viewing this topic.
USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 631
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a few 6954s and read a ton of articles about how hard it is to get the communication through SPI to work correctly using this chip.  Was wondering if anyone has played with it.
Logged

//LiNK

Be Excellent To Each Other
Offline Offline
God Member
*****
Karma: 8
Posts: 857
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a few 6954s and read a ton of articles about how hard it is to get the communication through SPI to work correctly using this chip.  Was wondering if anyone has played with it.

The answer is no, but I just did a bit of research on this and the problem is that the MAX6954 expects the clock pin to be handled in a way that is incompatible with the way Atmel processors or Arduino do SPI (not sure which).  From the datasheet:

Quote from: Maxim Integrated, Inc.
The MAX6954 is written to using the following sequence:
1) Take CLK low.
2) Take CS low. This enables the internal 16-bit shift register.
3) Clock 16 bits of data into DIN, D15 first to D0 last, observing the setup and hold times. Bit D15 is low, indicating a write command.
4) Take CS high (while CLK is still high after clocking in the last data bit).
5) Take CLK low.

Specifically, the SPI library takes CLK low before you can take CS high.   This is inconvenient, but hardly a show-stopper.  If you read the datasheet, know what the device expects, and control the lines yourself manually, you can make this happen.  There are only three lines here to work your magic on.  This is called bit-banging and it works just fine (I have used it on the MAX7219 and TLC5940, not to mention 74HC595s).  The chip on the other side has no idea you are doing it in software rather than using the SPI hardware in the processor and wouldn't care anyway.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26031
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The answer is no, but I just did a bit of research on this and the problem is that the MAX6954 expects the clock pin to be handled in a way that is incompatible with the way Atmel processors or Arduino do SPI
Well there was a site in German where someone had made a chess board with an arduino and a MAX6954 chip, but when I checked it now it seems to have changed and there is no mention of the chip on that page. That site put me onto this chip in the first place. I have some samples but have not used them in a project yet. The page used to be at:-
http://www.andreadrian.de/schach/#Selbstbau_Schachcomputer_SHAH

Google showed this:-
https://gist.github.com/1176125

Then there is an unresolved thread on this forum.
http://arduino.cc/forum/index.php/topic,12946.0.html
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 631
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well there was a site in German where someone had made a chess board with an arduino and a MAX6954 chip, but when I checked it now it seems to have changed and there is no mention of the chip on that page. That site put me onto this chip in the first place. I have some samples but have not used them in a project yet. The page used to be at:-
http://www.andreadrian.de/schach/#Selbstbau_Schachcomputer_SHAH

Wow, that's one hell of a post..  

Google showed this:-
https://gist.github.com/1176125


Yes found that as well, and got me thinking it could work.  I really haven't been through the code line by line yet, but will go over it and take out what I don't need.  Maybe I can get something happening.  

Then there is an unresolved thread on this forum.

http://arduino.cc/forum/index.php/topic,12946.0.html

Read that one as well, wondering why they stopped working on it...  

I think I may pursue this a little harder and see what I can come up with.  Maybe make a library to support it.
Logged

//LiNK

Pages: [1]   Go Up
Print
 
Jump to: