Just an update: So I hooked up the oscilloscope to the CS pin to see what was happening. When starting up, the default is HIGH. When the display is initialized, the pin is brought LOW, then HIGH again. Once initialized, the CS pin can be disabled, which makes sense. I’m still trying to find ways to get this thing working without adding a CS pin as I’m using all the pins!
I ordered the ST7789 display a couple of days ago for analysis. I expect to get it this weekend, but by then you may havealready solved the problem!
I’m just a determined tinkerer so I just get lucky sometimes. I hope you ordered the 1.3 without the CS pin. I so look forward to your analysis!!
FYI, I got a new XIAO BLE and another 1.3 display from a different supplier (no CS pin but different pcb). Still a blank display. Also, as before, it worked when I ungrounded the CS trace and connected it to a defined pin. Please et me know if you figure out what the problem is msfujino!
The reason why the ST7789 display without CS is not working on XIAO_nRF52840 (non-mbed) is because of the SPI clock waveform. The clock needs to be HIGH idling for normal operation, but it is going LOW at the end of each transaction and then back to HIGH at the start of the transaction.
Change “nrf_spim_disable(_spim.p_reg);” in the following two places to comments to make it work. However, be careful as you will be changing the library!
\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.8\libraries\SPI\SPI.cpp
void SPIClass::beginTransaction(SPISettings settings)
{
// nrf_spim_disable(_spim.p_reg);
this->_dataMode = settings.dataMode;
this->_bitOrder = (settings.bitOrder == MSBFIRST ? NRF_SPIM_BIT_ORDER_MSB_FIRST : NRF_SPIM_BIT_ORDER_LSB_FIRST);
nrf_spim_configure(_spim.p_reg, (nrf_spim_mode_t) _dataMode, (nrf_spim_bit_order_t) _bitOrder);
setClockDivider(F_CPU / settings.clockFreq);
nrf_spim_enable(_spim.p_reg);
}
void SPIClass::endTransaction(void)
{
// nrf_spim_disable(_spim.p_reg);
}
Works PERFECT!!! THANK YOU, THANK YOU THANK YOU!!