Thanks for the replies guys. I appreciate the help.
Hi Rob, I increased the delay to 1millisecond, and I still get the same results as before.
Hi John, I am quite new to coding, but what I thought I was telling the master to do is as follows please help me understand if I am mistaken (all constructive criticism is welcome):
-
master sets slave select (SS) Low--> this allows communication with the slave
-
call function transferAndWait ('a') --> sends command 'a' receives 0
-
call function transferAndWait ('b') --> sends command 'b' receives 'b[0]' and stores it in data.b[0] on master
-
call function transferAndWait ('c') --> sends command 'c' receives 'b[1]' and stores it in data.b[1] on master
-
call function transferAndWait ('d') --> sends command 'c' receives 'b[2]' and stores it in data.b[2] on master
-
call function transferAndWait (0) --> sends command 0 receives 'b[3]' and stores it in data.b[3] on master
-
master sets slave select High --> this ends communication with the slave
-
print results stored in data.f along with each byte of data.b[4]
Thanks,
Matt