Electronics > Microcontrollers

MAX 31865 and PIC16F SPI


I saw a glog on the same topic by NEXUS a couple of years ago.
I'm facing the same problem, is it possible for NEXUS to share some code ?
I'm stuck with writing to the MAX 31865 and getting a response.
I read both the MAX31865 and PIC16F19326 satasheets.
I have set up the configuration for SPI communication and sent a Write command.
I can see the CD, Clock and data on SDO pin with an oscilloscope.
I understand from the MAX31865 datasheet that after sending a Read byte (A7 = 0 + address) you have to send clock pulses to the slave MAX31865 in order to get an aswer, how do you do that?

Every time you send a byte you will receive a byte, and that involves generating 8 clocks.

Sometimes a device needs one or two dummy bytes before it is ready to send the requested data, so just send a few more bytes as required, ignoring what ever is received until the device starts sending data. The number of dummy bytes should be detailed in the datasheet.

If it needs less than 8 clocks then you'll have to take manual control of the clock line and toggle it yourself.


[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod