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

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

SPI - Difference between V5 & V8

Postby beneee » Sun Mar 24, 2019 12:19 am

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.44 KiB) Viewed 1139 times

apa102-V8.JPG
apa102-V8.JPG (35.14 KiB) Viewed 1139 times

send one - v8.fcfx
(8.84 KiB) Downloaded 37 times

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: SPI - Difference between V5 & V8

Postby kersing » Sun Mar 24, 2019 1:30 am

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).
These users thanked the author kersing for the post:
beneee (Sun Mar 24, 2019 2:26 pm)
Rating: 5.26%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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

Re: SPI - Difference between V5 & V8

Postby beneee » Sun Mar 24, 2019 2:26 pm

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: 14321
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4412 times
Been thanked: 4129 times
Contact:

Re: SPI - Difference between V5 & V8

Postby Benj » Mon Mar 25, 2019 12:35 pm

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: 15
Joined: Tue May 14, 2013 8:18 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: SPI - Difference between V5 & V8

Postby beneee » Mon Mar 25, 2019 3:03 pm

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
V8.PNG (14.78 KiB) Viewed 1080 times
V5.PNG
V5.PNG (10.17 KiB) Viewed 1080 times