SPI - Difference between V5 & V8

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
beneee
Posts: 37
Joined: Tue May 14, 2013 8:18 pm
Has thanked: 6 times
Been thanked: 1 time
Contact:

SPI - Difference between V5 & V8

Post by beneee »

I have tried asking on the V8 forum but have had no response, can someone please help me with using the SPI component to send data to LED's I have created identical files in FC V5 & FC V8, the V5 works using the SPI Legacy but the V8 does not using the SPI Master.

WHAT AM I DOING WRONG? - been trying to get this to work for days!

Is the SPI-Legacy component available for V8?

Please help.............

Here is V8 of the program

Ben
apa102-V5.JPG
apa102-V5.JPG (40.43 KiB) Viewed 3721 times
apa102-V8.JPG
apa102-V8.JPG (35.14 KiB) Viewed 3721 times
send one - v8.fcfx
(8.84 KiB) Downloaded 231 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: SPI - Difference between V5 & V8

Post by kersing »

LEDs with SPI? Nice. Got a link for them?

I don't see any chip select being asserted in your program. Normally for SPI I would expect something (Output Icon) that drives an output pin to set the chip select (SS) line of the receiving SPI device to the required level. (Usually to 0).
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

beneee
Posts: 37
Joined: Tue May 14, 2013 8:18 pm
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: SPI - Difference between V5 & V8

Post by beneee »

Hi kersing,

Just using the SPI bit to shove data and clock out to some APA102s so was not using CS output, seemed the easiest way of doing it a few years ago, are there any other components in flowcode that will also send data a byte at a time using Clock and data outputs you can think of as it looks like the SPI component has been changed since V5 and is now not suitable for my needs.

thanks
Ben

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SPI - Difference between V5 & V8

Post by Benj »

Hello,

The SPI component should still do what you need it to. Just check the properties of the SPI component.

Specifically the pin connections and the bus settings.

beneee
Posts: 37
Joined: Tue May 14, 2013 8:18 pm
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: SPI - Difference between V5 & V8

Post by beneee »

Ok, solved it by changing all the settings in V8 one at a time until it worked, the issue was the Clock Phase

In V5 you have a choice of Rising or Falling edge.
In V8 you have a choice of Leading or Trailing edge.

For APA102 LEDs to understand the data the V5 setting is Rising edge and in V8 it must be Trailing Edge.
To me they sound like they are reversed across the two versions as both have the polarity set as Low - is this by design?

Thanks
Ben
V8.PNG
(14.78 KiB) Downloaded 1606 times
V5.PNG
(10.17 KiB) Downloaded 1606 times

Post Reply