Porting ST7789 driver display to PIC32MX Family problem #1500
Unanswered
Elrir94
asked this question in
Q&A - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I’m trying to port a portion of your library to work with PIC32MX family, I’m using a custom board with a PIC32MX795F512H clocked at 80MHz. The display I’m trying to get to work uses an ST7789 chip, it’s a small 1.3” with 240x240 pixels and SPI interface with the following pinout: VCC, GND, SCK, SDI, DC, RES, BCKL.
To communicate with it I use SPI protocol in MODE 3 and a clock of 20MHz, sending 8bit at a time.
Until now I was able to communicate with the display and initialize it correctly (it shows the GRAM content after the init, that is a pattern of random color pixels). However, when I try to “select” a window to write in the GRAM, given a certain column and row of the display, the command doesn’t work. Let me explain I write the commands CASET and RASET and I send the coordinates in 16 bits format of XSTART, XEND (for CASET) and YSTART, YEND (for RASET), but when later I write in GRAM, the display “shows pixels” always starting from the top left corner according to the rotation function (which works fine).
Other strange thing is that the display shows pixels only if they are written in the following format: first 8 bits for the Green, then 8 bits for the Blue and lastly 8 for the Red (GBR strange format). I’ve done various tests, but nothing seems to work. I’ve checked the coordinates I send, after commands CASET and RASET, are in the display range as shown in the datasheet, but, again, nothing changes, any coordinate I choose, the display always starts showing pixels from the top left corner at each RAMWR command.
I’m sure the display works fine because both before and after hooking it up to my custom board and using my code, I’ve connected to a ESP32 SPARKFUN THING and used an example from your library and everything works fine.
Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions