Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How to define specific bit in a word transferred by SPI communication?

0 votes
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,

asked Sep 3, 2022 by Marko Dula (12 points)
This question has been discussed offline with the requestor directly.

 - Manu

Please log in or register to answer this question.