I am currently using PIC16F873 and CMX868 modem communicating through SPI. I got the SPI_Write to work perfectly but I had problems on SPI_READ routine.
here is how the operation goes:
1. PIC send DTMF tones(HEX) to the modem via SPI
2. modem decode the DTMF ang send out to speaker with the corresponding tone
3. modem accepts acknowledgement through a microphone(attahced to the modem) in the form of an audio tone
4. sends the audio tone to the PIC via SPI for verification
5. PIC decides what to do.
procedure 4 is where I get the problem. please see the datasheet below and look at page 27. Bits0-3 are the data I have to read.
An SPI slave cannot send data to the Pic, the Pic has to request the data. I think you need to send 0xe6 and then two dummy bytes. When the dummy bytes are sent you should receive the 16 bit status register.
Yeah, that will do! i'l try to shorten my codes. Im still not finished with my project, im now working on the EEPROM. Hopefully, I could make things work.