Hii,
I am interfacing CUI AMT203 Encoder with the TI TMS320F2835 microcontroller. According to the datasheet of encoder, I understand that the clock polarity = 0, clock phase = 1 should be used.
When clock phase = 0, clock polarity = 1, (0x10 is the command for reading position from the encoder)
MOSI Line (Master output) Command Sent |
MISO Line (Slave output) Response Received |
0x10 | 0x00 |
0x00 | 0x10 |
0x00 | 0x00 |
0x00 | 0x00 |
However I tried out, clock polarity =0 and clock phase =0, I find the following response from the encoder:
MOSI Line (Master output) Command Sent |
MISO Line (Slave output) Response Received |
0x10 | 0xA5 |
0x00 | 0xA5 |
0x00 | 0xA5 |
0x00 | 0xA5 |
0xA5 is the byte which encoder returns when there is no data to be sent
Can anyone please help me with, why there is such behavior observed? Can the encoder respond to both modes of SPI? In both the modes, I was not able to read the position of the encoder.
Thanks in advance,
Shalini Addepalli