2021-12-28 12:22 PM
Hello everyone, I am newbie, I want to use spi connection STM8 master with slave 16 bit IC. I have to write 16bit register to set the IC. How could I send 16 bit value to IC to set it with STM8, may you share some codes? best regards.
2021-12-29 10:10 PM
Hi!
16 bit = 2 x 8 bit. Very simple,
If you would need to write a 32-bit value to some SPI slave, you would also just sent 4 bytes. That's it!
2022-01-01 01:51 PM
Hello Cristian,
Thanks alot to answer me. Actually , I realized that I have already passed issue after buying logic analyzer. Our actual problem was reading, I mean ;
there are 32 bit register for reading
8 bit adress-16 bit data-8 bit command (last 8 of 4 bit is CRC ). So , I am very confused , to read the register with data.
May you give to me little code snapping please?
Best regards.