My project of the week (if I'm lucky) involves interfacing a PIC16F1703 to an Analog Devices ADIS16203 digital inclinometer. Both are SPI capable. However, the ADIS16203 works strictly in 16 bit words, and the PIC16F1703 SPI documentation only discusses 8 bit byte transfer. I assume that I just need to read two successive bytes over SPI to get the full 16 bit word from the inclinometer, but I can also see where things could easily go awry (given my past experience with odd serial protocols). In past projects, when things were a bit non-standard, I would just bit bang the data, rather than try to figure out how to set up all of the config registers and config bits. That's what I'd do here (and probably will bit bang it for initial testing), but eventually I want to get this working in an interrupt routine, so I'll have to use the actual SPI port.
Does anyone here have experience with 16 bit SPI, and tips or example code to share?
Edit: I should mention that this will be programmed in assembly language.
Does anyone here have experience with 16 bit SPI, and tips or example code to share?
Edit: I should mention that this will be programmed in assembly language.