Pages: [1]   Go Down
Author Topic: SPI wierdness  (Read 149 times)
0 Members and 1 Guest are viewing this topic.
Worst state in America
Offline Offline
God Member
Karma: 32
Posts: 819
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I just converted a graphics display driver from SPI bit-bang to hardware SPI. Works fine.

Strange thing though... it works REGARDLESS of which SPI mode I use!

The datasheet for the graphics device shows transfers on the rising edge of SCK and SCK idle mode is logic 1 which means "SPI Mode 3" (and mode 3 works).

But, modes 0 thru 2 ALSO work?

What the heck is going on here? Any ideas?

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect that as long as the data is stable when SCK goes from low to high it gets clocked in okay.

So, 0000000011111000000 works,
and 1111000011111111111 works
                  | as long as the data is done changing by here

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at
Arduino for Teens available at

Pages: [1]   Go Up
Jump to: