16-bit support for stm32f03 mcu. #3258
Unanswered
alpha815
asked this question in
Q&A - General
Replies: 2 comments
-
@alpha815 have you been able to solve this? I have a Bricked Nextion display and I am interested in using it with Arduino for some project. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @Bodmer You once wrote that you would not support the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
I hope you're doing well! I've been tinkering with this Nextion display I've had lying around for a while. I used it once but got frustrated with the software, so it's been gathering dust since then. However, I recently decided to give it another shot. I managed to trace out the pins for the display and the MCU, and I think I've got everything set up correctly. I can run the demo sketch just fine now.
However, there's a slight snag. This display uses a 16-bit interface, which isn't supported by the library. So, I tried to modify the library to shift out 16-bit data on the GPIO-Port where the display is connected. I located the relevant code in TFT_eSPI_STM32.h. After making these changes, though, the display started behaving differently. I'm not entirely sure if I've gone about this the right way or if there's something else I should tweak.
Changes were made in
section of file.
Based on my reverse engineering of the PCB, it seems the entire data bus is connected to Port B of the STM32 MCU.
Having an integrated SD card and 16 Mbit flash, including a touch controller, could really be handy. Any guidance or suggestions you could offer would be greatly appreciated!
I have dropped a video on youtube of the display running sample code it seems to be really fast.
#define tft_Write_16(C) GPIOX->BSRR = (0xFFFF0000 | (uint16_t)(C)); WR_L; WR_STB
#define tft_Write_32(C) tft_Write_16((uint16_t)((C)>>16)); tft_Write_16((uint16_t)(C))
#define tft_Write_32C(C,D) tft_Write_16((uint16_t)(C)); tft_Write_16((uint16_t)(D))
#define tft_Write_32D(C) tft_Write_16((uint16_t)(C)); tft_Write_16((uint16_t)(C))
my setup file:
#define STM32
#define TFT_WIDTH 320
#define TFT_HEIGHT 480
#define STM_PORTB_DATA_BUS
#define TFT_PARALLEL_8_BIT
#define ST7796_DRIVER
#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
#define TFT_BL PA8
#define TFT_BACKLIGHT_ON HIGH
#define TFT_CS PF6
#define TFT_DC PA15
#define TFT_RST PF7
#define TFT_WR PA12
#define TFT_RD PA11
#define TFT_D0 PB0
#define TFT_D1 PB1
#define TFT_D2 PB2
#define TFT_D3 PB3
#define TFT_D4 PB4
#define TFT_D5 PB5
#define TFT_D6 PB6
#define TFT_D7 PB7
#define TFT_D8 PB8
#define TFT_D9 PB9
#define TFT_D10 PB10
#define TFT_D12 PB11
#define TFT_D13 PB12
#define TFT_D14 PB13
#define TFT_D15 PB14
#define TFT_D16 PB15
Beta Was this translation helpful? Give feedback.
All reactions