Display TFT ST7789 (OshonSoft Basic).

DogFlu66

Member
I leave the library to use ST7789 TFT display, I have translated one that is in C language. But unfortunately I have not been able to get it to work yet. I leave the files in case someone with more experience with these displays can review it.
 

Attachments

  • Main_ST7789.bas
    1.5 KB · Views: 223
  • ST7789_240X240.bas
    15 KB · Views: 195
  • _SPI_Library.bas
    6 KB · Views: 205
  • _Pic18F26K22Library.bas
    46.4 KB · Views: 193
  • _SetUpAmicus18.bas
    2.9 KB · Views: 185
Hi,
I connected the SPI CLOCK and MISO and here's an oscilloscope reading.
I think it's 8MHz.

I'm using my Crystal 8MHz x4PLL
SLRCON = 0 'Slew rate = Normal
SSPSTAT.SMP = 0 :0 = Input data sampled at middle of data Output time
SSPSTAT.CKE = 0 :0 = Output data changes On clock transition from idle To active
SSPCON1.CKP = 1 '1 = Idle state for clock is a high level

I'm getting the colours, lines and text on the screen, but the loop timing slowly changes. e,g, it pints the text, then as time goes by the last few letters drop off then a few more till there is no text, then after more time it all prints again.
I'll carry on playing.
C
 

Attachments

  • OSC.jpg
    285 KB · Views: 13
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…