James Kidd / Adafruit_PCD8544_MBED

Issue: Wrong phase on the nRF51822

After 3 days trying to get my display working with my nRF51822 I discovered the clock phase was incorrect. I needed to change the LCD_SPI_MODE to 0x00 to get the correct clock signal.

Here is a picture of the waveform with spi mode 0x01. Notice how the clock's rising edge doesnt align with any of the data bits. The PCD8544 datasheet specifies "SDIN is sampled at the positive edge of SCLK" https://dl.dropboxusercontent.com/u/18843404/Screen%20Shot%202016-03-02%20at%2011.39.46%20PM.png