ws2801 fastSPI how can i do to run test

I have Arduino Uno rev 2, i have bought strip led ws2801

http://www.gree-leds.com/productshow.asp?ArticleID=PS7188S784

Now i'd like to know how to connect th4 4 wire of the strip (5V,ck,sI,GND) to Arduino PIN to run the example of fastSPI library.

Thanks

Did you read the documentation on the FastSPI web site? Specifically http://code.google.com/p/fastspi/wiki/Documentation ?

Thanks.
I read

The other two connections are for data control, the Serial Programming Interface SPI. There should be one for the SCK (clock) which has to be connected to the clock pin for SPI, usually pin 13 on recent arduinos. Then you need to connect the data input to the pin for master - to - slave data (MOSI), usually pin 11.

But in the example i see PIN 4 used.
I have only 4 wire, what pin i need?

#include <FastSPI_LED.h>

#define NUM_LEDS 150

// Sometimes chipsets wire in a backwards sort of way
struct CRGB { unsigned char b; unsigned char r; unsigned char g; };
// struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
struct CRGB *leds;

#define PIN 4

void setup()
{
  FastSPI_LED.setLeds(NUM_LEDS);
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_SM16716);
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_TM1809);
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_LPD6803);
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_HL1606);
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_595);
  FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);

that difference, if I connect to other digital pins on
ws2801?, is the speed?

i I have plugged sdcard to pins 11, 12, 13, 10. and ws2801 to pins 3, 4

What is sdcard?

Sd card

contecavour:
Thanks.
I read

The other two connections are for data control, the Serial Programming Interface SPI. There should be one for the SCK (clock) which has to be connected to the clock pin for SPI, usually pin 13 on recent arduinos. Then you need to connect the data input to the pin for master - to - slave data (MOSI), usually pin 11.

But in the example i see PIN 4 used.
I have only 4 wire, what pin i need?

The WS2801 does not use that, you can ignore it. You can also comment the .setPin() line further down because that too isn't needed.

Naruto128:
that difference, if I connect to other digital pins on
ws2801?, is the speed?

i I have plugged sdcard to pins 11, 12, 13, 10. and ws2801 to pins 3, 4

If you are using FastSPI_LED, you must connect the strip on the SPI bus, same as your SD reader. Pins 3 and 4 are not SPI ports.

However, because an WS2801 doesn't have a select line, you will encounter problems when you try to address the SD reader with the string also attached. You need to separate the two and use additional hardware to do that. Search the forums, it's been discussed before.

On the other hand, you can use something other than FastSPI_LED to drive the WS2801 strip via bitbang mode, and you won't need the SPI bus for that. At that point, you can connect it anywhere you want and use whatever pins you want.

You can also try the preview release of FastSPI_LED2 which allows you to use whatever pin you want, as well as driving multiple strings on the same AVR.

KirAsh4:

Naruto128:
that difference, if I connect to other digital pins on
ws2801?, is the speed?

i I have plugged sdcard to pins 11, 12, 13, 10. and ws2801 to pins 3, 4

If you are using FastSPI_LED, you must connect the strip on the SPI bus, same as your SD reader. Pins 3 and 4 are not SPI ports.

However, because an WS2801 doesn't have a select line, you will encounter problems when you try to address the SD reader with the string also attached. You need to separate the two and use additional hardware to do that. Search the forums, it's been discussed before.

On the other hand, you can use something other than FastSPI_LED to drive the WS2801 strip via bitbang mode, and you won't need the SPI bus for that. At that point, you can connect it anywhere you want and use whatever pins you want.

You can also try the preview release of FastSPI_LED2 which allows you to use whatever pin you want, as well as driving multiple strings on the same AVR.

reference to connect the WS2801, in terms of speed, which is faster, the SPI port OR other digital ping?

to connect the WS2803, i use this code

const int ws2803_clockPin = 3;
const int ws2803_dataPin = 4;

#define nLEDs 54

uint8_t ledBar[nLEDs];

void setup() {
  Serial.begin(9600);
  pinMode(ws2803_clockPin, OUTPUT);
  pinMode(ws2803_dataPin, OUTPUT);

// Initialize WS2803 - Clock needs to be low at least 600us to prepare itself.
  digitalWrite(ws2803_clockPin, LOW);
  delayMicroseconds(600);

// Initialize the ledBar array - all LEDs OFF.
  for(int wsOut = 0; wsOut < nLEDs; wsOut++){
    ledBar[wsOut] = 0x00;
  }
  loadWS2803();
  
  
  
  

  
}



void loop() {
for(int wsOut = 0; wsOut < nLEDs; wsOut++){
    ledBar[wsOut] = 123;
  }
  loadWS2803();  
}

void loadWS2803(){
    for (int wsOut = 0; wsOut < nLEDs; wsOut++){
    shiftOut(ws2803_dataPin, ws2803_clockPin, MSBFIRST, ledBar[wsOut]);
    }
    delayMicroseconds(600); // 600us needed to reset WS2803s
}

The WS2801 does not use that, you can ignore it. You can also comment the .setPin() line further down because that too isn't needed.

Therefore..wath pin must i use to run led with ws2801?

N

Naruto128:
reference to connect the WS2801, in terms of speed, which is faster, the SPI port OR other digital ping?

Bitbanging is always slower than native SPI. HOWEVER, how fast do you NEED it to be? You may find that even with bitbanging it's way faster than you need to send data out. This is where you need to do your own homework and TEST things.

Naruto128:
to connect the WS2803, i use this code

That's bitbanging.

contecavour:
Therefore..wath pin must i use to run led with ws2801?

None. Use the SPI bus, and you already found the answer to that question. You quoted it above.

None. Use the SPI bus, and you already found the answer to that question. You quoted it above.

If tou speak about pin 13, ok, ma the other wire (sI)?
I

But it's so difficult say the answer?
Ck wire to PIN ???
dI wire to pin ???

contecavour:
But it's so difficult say the answer?
Ck wire to PIN ???
dI wire to pin ???

You already found the answer:

contecavour:
I read

The other two connections are for data control, the Serial Programming Interface SPI. There should be one for the SCK (clock) which has to be connected to the clock pin for SPI, usually pin 13 on recent arduinos. Then you need to connect the data input to the pin for master - to - slave data (MOSI), usually pin 11.

[/quote]

Ok.

clk pin13
sI pin 11.
Thanks.

But the line
#define PIN 4
....

What sense has?
N

contecavour:
But the line
#define PIN 4
....

What sense has?

It's for a different chip.

T H A N K S !!!!!!!!!!!!!!!!!!!!!!!!

N

I try it with a cut stri by 10 leds.
Doesn't works!

N

as it is, the physical connection between sdcard and ws2801, SPI port?

KirAsh4:

Naruto128:
that difference, if I connect to other digital pins on
ws2801?, is the speed?

i I have plugged sdcard to pins 11, 12, 13, 10. and ws2801 to pins 3, 4

If you are using FastSPI_LED, you must connect the strip on the SPI bus, same as your SD reader. Pins 3 and 4 are not SPI ports.

However, because an WS2801 doesn't have a select line, you will encounter problems when you try to address the SD reader with the string also attached. You need to separate the two and use additional hardware to do that. Search the forums, it's been discussed before.

On the other hand, you can use something other than FastSPI_LED to drive the WS2801 strip via bitbang mode, and you won't need the SPI bus for that. At that point, you can connect it anywhere you want and use whatever pins you want.

You can also try the preview release of FastSPI_LED2 which allows you to use whatever pin you want, as well as driving multiple strings on the same AVR.

can not find the hardware to connect the WS2801 and SD CARD.

you would have the schematic?