thanks for the info , as i did not know how to include a comma in that way
perhaps its me who is not too clear on the shiftout command and how it works , but the way i read the command from the help is that items within the brackets [ ], separated by a comma are the bytes to be sent synchronously ,
eg - shiftout , datapin , clockpin ,mode, [ byte(0) , byte(1), byte(2)]
the number of bytes can be as many as required , but each byte hex value MUST have a comma separating them ,
the waveform produced would generate the clock and bits data values for the number of the bytes shown
after each byte processed within the command , will hold the clock pin low period 2 times longer than each clock tick width , then process the next byte , till all bytes are sent
the waveform would have no breaks in time for the total of each bytes sent per command , register byte , data bytes
i am not sure if that is important to other chips on the SPI bus as i thought it may be for it is looking for command , register , number of bytes in sync
as such you would need to get the data you want to send as one complete string and then execute the command once.
now if i loop the command such as
for x to number_bytes
shiftout , datapin , clockpin ,mode, [ data_out(x)]
next x
the resulting waveform will have a longer time between each byte processed as only 1 byte is sent per the command
it is in effect sending command byte , then next loop , register byte , then next loop data byte(0) , etc
if that is not a problem for any device on a SPI then all i need do is loop untill the number of bytes to be sent
but i think you will see the differences in the resulting waveform between the 2 methods
admittedly as write the explanation, i also solve the problem sometimes as well ,
so will loop and see how it goes i think
cheers
Bookmarks