Hi NevadaMark,
Sorry for the late response. I only have a 2-channel scope at moment and I captured the graphs for the CS and SCLK signal on the screen, and then I showed the DIN and DOUT signal on the scope as you will see on the picture I attached.
From the top to the bottom are CS, SCLK, MOSI, MISO. It looks like the output signal(MISO) is correct. However, I still have only 0 output on the tera term terminal.
Here below is the code I used:
#include "mbed.h"
#include "stdio.h"
SPI imu(p5, p6, p7); //set up spi interface on pins 5,6,7
DigitalOut cs(p8); //use pin 8 as chip select
Serial pc(USBTX, USBRX); //USB interface to host terminal
int x;
int main(){
cs=1;
wait_ms(500);
imu.format(16,3); //16 bit data, mode 3
imu.frequency(1000000); //1MHz clock rate
while(1) {
cs=0;
imu.write(0x8000);
x=imu.write(0x7E00);
cs=1;
pc.printf("x=%d\n\t", x);
}
}
Best,
RobinUofC