pasm and array ?? and how the if work ???
Anubisbot
Posts: 112
Hi every one ,
i am trying to get my spin code to pasm , but i am not shure what i am doing, since it includes some shiffting.
here is my spin code
PRI RGB_loop | t ' start the time value at zero ' PWM Loop dira[noparse][[/noparse]27..19]~~ ' Make pin 0, pin 1, and pin 2 all outputs t := 0 repeat outa[noparse][[/noparse]27..19] := RGB_state[noparse][[/noparse]t] >> 19 ' Set states of all pwm pins simultaneously Shift 16 t+ = 1 ' Change to the next state if t == TableSize ' If t goes off the edge of the table NOTE change t := 0
what it does is it takes a long RGB_State array and puts it contents in the output of my propeller.
The table size is 250 and so its a continus running loop
Here is my Pasm code as far i can get with my knowledge ...
DAT org entry mov dira, diraval 'set APIN to output rdlong ta, 0 :loop rdlong value, RGB_state(ta) mov outa, value add ta , 1 jmp #:loop diraval long %0000_1111_1111_1000_0000_0000_0000_0000 'APIN=15 BPIN=16 value res 1 ta res 1
I hope some one can help , best regards Anubisbot....
Post Edited (Anubisbot) : 9/19/2008 8:54:51 PM GMT