Can I use nested brackets like this:
ShiftIn FPU_DATAIN, FPU_SCLK, MSBPRE [FloatByte[0], FloatByte[1]_
FloatByte[2], FloatByte[3]]
Printable View
Can I use nested brackets like this:
ShiftIn FPU_DATAIN, FPU_SCLK, MSBPRE [FloatByte[0], FloatByte[1]_
FloatByte[2], FloatByte[3]]
There's nothing that says you can't use array variables in the SHIFTIN/OUT command. As with everything, try it and see.
What you can do (a little secret you may not know about) is that you can use normal brackets () around your array variables rather than square ones to distinguish them from the square brackets in the SHIFTIN Command... like so...
By the way, your example had a comma missing after MSBPRE and another after FloatByte[1] either of which whould have cause a compilation failure.Code:ShiftIn FPU_DATAIN, FPU_SCLK, MSBPRE, [FloatByte(0), FloatByte(1), FloatByte(2), FloatByte(3)]
Thanks Melaine. I couldnt find an example that used arrays with the shift commands. Btw, sweet tip on the (). That makes it a little easier to read.
The code was something I typed up real fast, and not the actual code. This explains the bad formatting :)