I am trying to connect master and slave via SPI protocol and to configure registers of a slave for specific purpose. I am trying to define one 8-bit register of a slave in for example this sequence of bits: 0000 0111
In order to do so, I have to properly define GPIO pins for MISO, MOSI, CS, CLK, define 8 bit word size and define that I am sending just one word. My question is how do I define 0000 0111 bit sequence?
My assumption is that I have to define one word that is entering in TX and that word should be 7, because 7 in decimal numbers is 0000 0111 (which is bit sequence I have to assign to the first register). Could you confirme this if I am correct? If I am wrong, please explain this to me.
Are words assigned in TX sent to the registers in the same order? Is the first word in TX vector going to occupy the first register in slave?
Thank you for your help and have a nice day,