Hello,
I am trying to read MAX22200 Serial-Controlled Solenoid and Motor Driver data with spi communication. I ran into a few problems and frankly, I couldn't find many examples on the internet so I wanted to ask here.
When I examined the datasheet, I read that I had to send the Command Register to the sensor first and then write data or read data.
For example, when I energize, I want to read the STATUS Register Address(0x00) data of the sensor. I am sending 0x80 by SDI as Command Register.
In order to be able to read 32-bit data after the data, I send 0x00 by SDI, since no information is given on the datasheet side, I read 0x00 by SDO.
The question mark point stuck in my head here is actually when I change any bit of the STATUS Register, I still read 0x00.
Topics on my mind,
- While the command register is sending 8-bit data, only the CMD pin will be made HIGH-LOW, then it should always stay LOW, right?
- The bit 0x02 status referred to as STATUS[0:7] is understood as FAULT, but what is the status it returns by default?
- Can you share sample code that I can review on this topic?
naming error fixed.
[edited by: aemiroglu at 6:19 AM (GMT -4) on 14 Jul 2023]