Reading from SPIM master mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I trying to read the MCP23S18-E/SP IO expander from micochip. 

   

I write operation is working fine but I can not read the port from the IC. 

   

Please see the attached files .

   

Ahmed

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Renamed SPIM_ReadByte(), SPIM_WriteByte()APIs to SPIM_ReadRxData(), SPIM_WriteTxData()

   

SPIM_ReadRxData() API returns invalid data if the FIFO is empty. Call SPIM_GetRxBufferSize(), and if it returns a nonzero value then it is safe to call the SPIM_ReadRxData() function.

View solution in original post

0 Likes
2 Replies