Hi all and thxs in advance it's my first time working with SPI (and sorry for my english),
I must comunicate a HC08SH8 microcontroller and a magnetic rotary encoder (AS5040 it use a SSI interface http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5040).
If I understood correctly the encoder datasheet as soon as the /CS goes LOW and it has CLK signal it will transmit trought the data line the angular position of a magnet.
How I must configure the SPI as a Master or as a Slave? Now I configured the SH8 as a master and plugged the data ouput from the encoder to the MISO line (because I want to stablish a comunication), is it correct? Nothing work for the moment, I don't have CLK signal on SPICLK output so it must be a configuration problem.
I only need to read so I must wait (polling or IRQ) until fill the read-buffer isn't it?
another question how can I read 16 bit data-transmission? the encoder give me the position data un 10 bits + CRC + some magnet data.
I need some help!