??? 06/17/09 03:52 Read: times |
#166167 - Have you tried ... Responding to: ???'s previous message |
Have you tried the compass module in its UART mode?
For SPI mode the "H" or "h" is supposed to be sent simultaneously when the module is clocking out the "s" byte. Make completely sure that this is happening. I can comment that the device data sheet does a horrible job of depicting the actual waveform timing of the signals in the diagram at the bottom of page 10. One can only hope that the actual mode is as I've enhanced below: Here the module clocks out data at the rising edges of SCK (blue arrow) to SDO. The MCU would then expect to strobe in the data at the next falling edge of SCK (green arrow). It would be normal to expect the SDO data valid time to the next rising edge of SCK. In similar manner the MCU should be sending data back to the module by clocking a bit out at the falling edge of SCK (red arrow) onto SDI. The module would then expect to strobe in the data at the next rising edge of the SCL signal (violet arrow). It would likewise be normal for the MCU to hold the bits on the SDI line for nearly a full SCK time till its next falling edge. Thats the way SPI should work (alternate clock & data phasing is used sometimes). It is not, and I repeat not, realistic to expect the module to only hold the data valid for only a short blip after a clock edge and yet claim that the device is SPI compatible. If you see it working with blips on your scope then you'll need to really pull a chain around the Honeywell neck and demand a better data sheet with specific data blip timing. If my diagram does turn out to be how the device actually works then you need to be sure that the MCU clocks out the MSB of the "h" on the second falling SCK edge and not the first one!! Good Luck Michael Karas |
Topic | Author | Date |
SiLabs C8051F500 and SPI | 01/01/70 00:00 | |
answered in crosspost at silabs forum | 01/01/70 00:00 | |
Please help? | 01/01/70 00:00 | |
it could be | 01/01/70 00:00 | |
Slave | 01/01/70 00:00 | |
Have you tried ... | 01/01/70 00:00 | |
thank you | 01/01/70 00:00 | |
Juat a thought | 01/01/70 00:00 | |
compass | 01/01/70 00:00 | |
update | 01/01/70 00:00 | |
just for fun/verification![]() | 01/01/70 00:00 |