go_away

Author Topic: SPI interface - header pin standards  (Read 6033 times)

0 Members and 1 Guest are viewing this topic.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
SPI interface - header pin standards
« on: April 08, 2009, 06:06:17 PM »
Am creating my own sensor and want to provide an option to connect it via SPI (since its faster than I2C/TWI and UART).

I know I need to connect MOSI, MISO, SCK, GND and SS (if there is more than one device). But my issue is what sort of header pin layout should my board provide - so that its compatible with any 'standard' SPI connector lead ?

Obviously the 6 pin ISP programmer uses a 'kinda SPI' connection but also connects to various other pins like Reset and Vcc which aren't required by the bare interface.

Anyone have a sensor or other board with an SPI breakout? If so - what does it look like?


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: SPI interface - header pin standards
« Reply #1 on: April 08, 2009, 06:21:13 PM »
There is no "standard".

I think using the 6-pin ISP is a reasonable approach. Make SS = reset. Power can be there, or not.

There is a 6-pin SPI connector on the U421 (http://www.circuitgizmos.com/products/cgu421/cgu421.shtml) that matches the ISP header for programming AVRs. You could certainly use something like the U421 to be a USB-SPI device. That is the closest to a "standard" that I can find - that arrangement is common.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
Re: SPI interface - header pin standards
« Reply #2 on: April 08, 2009, 06:34:30 PM »
Thanks - but am not looking at trying to give a USB solution - just pure SPI (already have UART and I2C options). Had a quick look at the docs on that site and cant see anything obvious about the SPI port.

My main concern is to make connectivity easy. ie look at one mcu board and the uart may be 1x3 headers: gnd,tx,rx but look at another and it may be gnd,rx,tx. So you need to make up yet another cable.

The main thing I dislike about the ISP 2x3 pin arrangement is that most people dont have a connector like that in their spares box. So I was hoping a 1x4 arrangement might exist.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: SPI interface - header pin standards
« Reply #3 on: April 08, 2009, 06:49:11 PM »
Thanks - but am not looking at trying to give a USB solution - just pure SPI (already have UART and I2C options). Had a quick look at the docs on that site and cant see anything obvious about the SPI port.

My main concern is to make connectivity easy. ie look at one mcu board and the uart may be 1x3 headers: gnd,tx,rx but look at another and it may be gnd,rx,tx. So you need to make up yet another cable.

The main thing I dislike about the ISP 2x3 pin arrangement is that most people dont have a connector like that in their spares box. So I was hoping a 1x4 arrangement might exist.

I didn't say you needed a USB solution. I offered an example of a device (which happens to ba a USB to SPI device) that uses the same pin arrangement as ISP for a SPI connector.

If you want to use your own 1 by 4 connector (for five signals) that is certainly your choice. If you find something that you feel is a "standard", please feel free to follow it.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: SPI interface - header pin standards
« Reply #4 on: April 10, 2009, 09:45:16 AM »
Quote
The main thing I dislike about the ISP 2x3 pin arrangement is that most people dont have a connector like that in their spares box. So I was hoping a 1x4 arrangement might exist.
I think the 2x3 is the best standard you'll get.

Just get two 3 pin headers (like that on servos).

You can always go with an optional jumper to use Vcc on the sensor board. :P

 


Get Your Ad Here

data_list