Re: VAR array compile issue
Have a variable like
Then swap the variables in your array.
Your new code will look like below.
Code:
'-------------- Low Address /High Address /Data / Inv Data bytes --------------
For T = 1 to 4
FOR Index = 7 TO 0 step -1 ' Loop for 8 bits data start at bit 7-0 and send
temp = STDByte[T]
IF temp.0[Index] = 0 THEN ' Get polarity of each data bit to send
Space = Zero ' Pulse time = Burst (560us) + Zero (560us) = 1.12mS for a "0" data bit
ELSE
Space = One ' Pulse time = Burst (560us) + One (1680us) = 2.24mS for a "1" data bit
ENDIF
STDByte[T] = temp
GPIO.0 = 0 ' Set Output low
pauseus Burst ' load the burst for 0.56ms
GPIO.0 = 1 ' Set Output high
pauseus space ' High for duration of either Zero or One value ,for each address/data b
Total[T] = Total[T] + space + burst ' store total time of string
NEXT Index ' Loop until 8 data-bits sent of DByte(X)
Next T
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks