The image above shows a Microbit V1 connected to an ST7789 1.14′ display via a Kitronik breakout board. The SPI interface on the Microbit (NRF51822) is a little slow at 4MHz but it is ok for simple outputs as shown above. Code was developed using VSCode, PlatformIO the mbed framework. The full list of connections can be found in the file display.cpp which is available on the github repo over here
Month: February 2021
An NRF52832 with an ILI9341 display
The NRF52832 is a Bluetooth microcontroller from Nordic Semiconductor. Boards and modules based on it are available from a number of different suppliers. I got a few on Aliexpress that bear the Ebyte logo. These were pre-programmed (and locked) with a software image from Ebyte. As I planned writing my own code I had to first unlock the device. Normally I work with an STLink debugger (clone) but this is apparently not able to unlock the NRF52832. Fortunately I had previously bought a J-Link Edu probe and this able to unlock the module.
The next hurdle was to figure out which pin is which as the board labels are specific to some other application. With a bit of fishing around datasheets and poking with a multimeter I came up with this:
The pin numbers could now be related to port numbers in the NRF52832.
Next the device had to be connected up to the ILI9341 display module. This too was bought on AliExpress. It is an SPI device that includes a touch screen controller. The wiring to the NRF52832 module is as follows:
|T_IRQ||P0_4||0 if screen is touched|
|T_CS||P0_5||Chip select for touch interface (active low)|
|LED||Via 10 ohm resistor to ground|
|D/C||P0_6||Switches between data and command mode (0=Command mode)|
|RESET||P0_7||Clear to 0 to reset the display|
|CS||P0_28||Chip select for display (active low)|
MBed and Visual Studio Code / PlatformIO were used to write code for the device. Initially Mbed was used but it can be slow at certain times of the day so I switched to VSC/PlatformIO for local development. This was a little fiddly to set up but it worked out very well in the end. MBed OS was used as a basis for the code and a working demo is available over here.
Mbed does not have a board support library for this specific board however the DELTA DFBM-NQ620 board uses the same NRF52832 module and works fine.
There were a couple issues along the way:
The NRF52832 has a maximum SPI speed of 8MHz which is a little slow for a display like this.
The Touch screen controller does not work well with the 8MHz SPI clock rate so this is switched down to 2MHz temporarily when reading the touch interface.
The rats-nest final system is shown below.