The following is a simple test program to demonstrate how to use of APA-102 leds.

It lights the Blue led and shifts it ten places in 100ms interval.

To successfully manage this, tens of hours were spent... Datasheet sucks.

But in general is much easier to control as the timings are those of an SPI interface and can be really fast driven if you have the resources.

Code:
arraywrite red_a,[0,0,0,0,0,0,0,0,0,0,0]
arraywrite green_a,[0,0,0,0,0,0,0,0,0,0,0]
arraywrite blue_a,[255,0,0,0,0,0,0,0,0,0,0]

gosub display_led

stop

display_led:
    for k=0 to led_num
        for i=0 to led_num
            shiftout led_data,led_clock,1,[lum,blue_a[i],green_a[i],red_a[i]]
        next i
    gosub shift_sub
    next k
    pause 1000 'delay from one color to another
return

shift_sub:
    shiftout led_data,led_clock,1,[%11100011,0,0,0,0,0] 'END of Frame
    pause 100'led move step delay
    temp=red_a[k]:RED_A[k]=RED_A[k+1]:RED_A[k+1]=temp
    temp=green_a[k]:green_a[k]=green_a[k+1]:green_a[k+1]=temp
    temp=blue_a[k]:blue_a[k]=blue_a[k+1]:blue_a[k+1]=temp
return
Ioannis