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: 201
  • ST7789_240X240.bas
    15 KB · Views: 179
  • _SPI_Library.bas
    6 KB · Views: 191
  • _Pic18F26K22Library.bas
    46.4 KB · Views: 179
  • _SetUpAmicus18.bas
    2.9 KB · Views: 169
Hi,
You may have followed my other threads, where I prove that I'm not a natural programmer, and on the main other thread, after 5 years of development, I failed to finalise it.
This thread is going the same way for me.
It seems like we all have a different way of programming, that I find simply to hard to follow everybody.

I'm going to drop out of this one, as it just too hard for me.
As you can see from my posts here, I have programs working using others CODE along with mine. I'll just play with these is my simple way and see what I can do.

Thanks for all of your efforts.
C
 
If its any consolation, I know I've been missing ( work and Christmas ) but I cannot get your board to give a decent clock pulse, So If I cannot, well...

Never give up..
 
What is not working for you?. Have you tried the example (thread #267) that I posted for TFT ILI9341 with Pic18F46K20 microcontroller?.
If it does not work for you, I recommend that you update the Oshonsoft Pic Basic.

The example works with a 32Mhz oscillator and an 8Mhz SPI bus, in case your display does not work with the 8Mhz SPI bus (your display is slower) you can lower the speed to 2Mhz by changing:
Call LCD_SPI1_Init(LCD_SPI_MODE2, LCD_SPI_MASTER_SPEED0 | LCD_SPI_ENABLE) 'CLK 8Mhz (32Mhz) by Call LCD_SPI1_Init(LCD_SPI_MODE2, LCD_SPI_MASTER_SPEED1 | LCD_SPI_ENABLE) 'CLK 2Mhz (32Mhz)

Which card should I use anyway?.
 
Last edited:
If its any consolation, I know I've been missing ( work and Christmas ) but I cannot get your board to give a decent clock pulse, So If I cannot, well...

Never give up..
Hi I,
I'm long retired now, but I remember the days when I had to work Christmas and new years day, I dare say that you had a bit of cake ? There's no hurry.

Regarding the clock! Do you mean the SPI CLK or the OSC?
If it was the SPI CLK, then did you see my analyser posting?

Perhaps if you let me know in detail, what you did exactly, I'll do the same and post my result.
C
 
Last edited:
Hi D,
I updated both the IDE and Comp (why two?) 573

I took me ages to figure out which of your bits goes into OSH, but I think I got it in the end, and it doesn't work.

Is it that you use a big chip and on my PCB is SMD?
Is it that I use 'cloned' TFT ILI9341?
Is it due to capacitance?

I noticed that after trying your CODE, my CODES don't work, until I've found 'say' and old 240X240 CODE, then work up to the later ones, and I wonder if the TFT ILI9341 stores set-ups and uses them later?
Perhaps like this https://www.electro-tech-online.com/threads/display-tft-st7789-oshonsoft-basic.166219/post-1457383

I think first I'll try to address 'I's' OSC, then perhaps it will 'oil some wheels'?

As mentioned this is really hard for me, so please explain in more detail, if I am involved please?
C.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…