Super familiar touchscreen ... Will it connect with #PineDio Stack? 🤔
Voilà! Solar Panel with Touchscreen inside 😂
BL602 Firmware runs OK on PineDio Stack #BL604 @PINE64 ... Here's our Blinky Firmware
https://github.com/lupyuen/bl_iot_sdk/blob/3wire/customer_app/pinedio_blinky/pinedio_blinky/demo.c
Normally we talk to #ST7789 SPI Display in 4-Wire (8-bit) Mode ... But today we do 3-Wire (9-bit) Mode ... With a sneaky packing hack
How we pack 9-bit #ST7789 data ... Into 8-bit SPI
Now we test the code that packs #ST7789 9-bit data into 8-bit SPI
We're sending SPI data to #ST7789 in multiples of 9 Bytes ... Due to the 9-bit packing
Since our #ST7789 Driver Code is in C, let's test it locally on Linux!
Verifying the packed #ST7789 9-bit data with a spreadsheet ... Our packing is indeed correct 🤔
https://docs.google.com/spreadsheets/d/1Qy0MjU79s__wzTAFwpTYUUIzLWcrFnKCrvvo_rHamiE/edit?usp=sharing
#PineDio Stack SPI Port is exposed on the GPIO Connector ... So we connect our Logic Analyser there
ST7789's CS Pin (GPIO 20) is not exposed on #PineDio Stack's GPIO Connector ... So we use GPIO 5 to Shadow the CS Pin
#BL604 doesn't seem to be transmitting anything to ST7789 on SPI MOSI (GPIO 17) ... Let's try a different pin for MOSI
Which is super strange because GPIO 4 is supposed to be MISO on #BL604 ... Not MOSI! 🤔
https://lupyuen.github.io/articles/spi#spi-data-pins-are-flipped
GPIO 4 works as MOSI but not GPIO 17 ... What if we connect GPIO 4 to 17? Nope still nothing on the #PineDio Stack ST7789 Display 🤔
Yep MISO and MOSI are now swapped! This matches the SPI Pin Definitions in #BL604 Reference Manual ... So from now on we'll always call GLB_Swap_SPI_0_MOSI_With_MISO
Need to verify that our #ST7789 Display is hardwired for "3-line 9bit serial I/F Ⅱ" mode: IM0 = 1, IM1 = 0, IM2 = 1, IM3 = 1 🤔
Let's port moononournation's awesome 9-bit-banging GFX Library to #BL604 ... And compare the SPI Output with a Logic Analyser
We run the GFX Library on Linux ... To see the data that will be transmitted to #ST7789 Display
https://github.com/lupyuen/bl_iot_sdk/blob/3wire/customer_app/pinedio_st7789_bitbang/test/test.c
Since our #ST7789 Display doesn't respond to GFX Library 9-Bit Banging ... Maybe our display isn't hardwired for 3-Wire 9-Bit mode? Let's verify IM0 to 3 with the display maker
What's it like to create #OpenSource software for brand new Prototype Hardware ... Like #PineDio Stack BL604? All shall be explained in this article
Connecting #PineDio Stack BL604 @PINE64 ... To a super-familiar ST7789 SPI Display
https://lupyuen.github.io/articles/pinedio?3#connect-the-display
Flashing Firmware to #PineDio Stack #BL604 ... With the same tools as BL602!
https://lupyuen.github.io/articles/pinedio?5#flash-firmware-to-bl604
How we init the #PineDio Stack #BL604 SPI Port
https://lupyuen.github.io/articles/pinedio?7#initialise-spi-port
Always have a Logic Analyser ready ... When testing Prototype Hardware! 👍
#BL604 SPI Pins are Swapped! 🙄 Here's the workaround for #PineDio Stack
https://lupyuen.github.io/articles/pinedio?10#spi-pins-are-swapped
#PineDio Stack uses the 3-Wire Interface for #ST7789 ... Instead of the familiar 4-Wire Interface
https://lupyuen.github.io/articles/pinedio?11#st7789-display
Sending 9-Bit Data to #ST7789 ... Over 8-Bit SPI? 🤔
https://lupyuen.github.io/articles/pinedio?12#9-bit-spi-for-st7789
How we pack 9-Bit Data for 8-Bit SPI
https://lupyuen.github.io/articles/pinedio?13#packing-9-bit-data
Testing the 9-Bit Packing ... With Linux and a spreadsheet
https://lupyuen.github.io/articles/pinedio?14#test-the-9-bit-packing
We ported moononournation's awesome 9-Bit-Banging Arduino GFX Library to #BL604 ... But something seems broken in our #ST7789 Display 🤔
https://lupyuen.github.io/articles/pinedio?16#arduino-gfx-ported-to-bl604
Maybe our #ST7789 Display isn't wired for 3-Wire (9-Bit) Interface? 🤔
https://lupyuen.github.io/articles/pinedio?17#problem-with-st7789
Yep @JF and I have plenty to test on #PineDio Stack #BL604 @PINE64 ... If you're keen to help please let us know! 🙏
https://lupyuen.github.io/articles/pinedio?18#seeking-volunteers
GPIO 8 is your friend ... For flashing #PineDio Stack #BL604
https://lupyuen.github.io/articles/pinedio#flash-firmware-to-bl604
Spiky Pogo Pins ... Might be helpful for probing this super tiny connector for ST7789 Display 🤔
https://lupyuen.github.io/articles/pinedio#connect-the-display
Here's what we discovered from the Pogo Pin Probing ... For #PineDio Stack #ST7789 Display Connector 🤔
https://lupyuen.github.io/articles/pinedio#problem-with-st7789
SPI Bus on #PineDio Stack #BL604 ... Shared by ST7789 Display, LoRa SX1262 and SPI Flash
https://lupyuen.github.io/articles/pinedio?6#bl604-spi