I'm using LPC55S06-EVK. I have downloaded SDK_2_12_0_LPCXpresso55S06.
As per development kit connection, I'm using the following 4 MCU pins for SPI interface.
- Pin-59: SCK SPI_FLASH_PIO0_6
Pin-55: MOSI SPI_FLASH_PIO0_3
Pin-57: CS SPI_FLASH_PIO0_4
Pin-54: MISO SPI_FLASH_PIO0_2
I'm using ADXL345 as a SPI slave device.
Question:
Which command to use for 1-byte data Write & Read?
--------------------------------------------------
SPI-Write:
Byte-0 = 0x00 (MOSI, Command/Address. Output from MCU)
Byte-1 = 0x55 (MOSI, Write 1-byte data. Output from MCU)
SPI-Read:
Byte-0 = 0x80 (MOSI, Command/Address. Output from MCU)
Byte-1 = 0xXX (MISO, Read 1-byte data. Input to MCU)
ADXL345's SPI timing waveform attached