Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
I can get a pic.. I will get one next time I order from RS..

Do you have another board you can test? Leave off the pic18f4431 and watch the SCL.. at the moment I do not get proper switching ... Here is the clock at 4Mhz

View attachment 148036

Look at the data signal (bottom) rise and fall more than half the clock.. This is either the chip itself or stray capacitance... Now both these signals are on the same port.. I also see the peak to peak IS 3,3v so we are getting neg to pos... I wonder if there is a slew issue here.. let me divulge the datasheet see it there is a setting.. I do not use the 3v3 devices..
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
    OSC.jpg
    285 KB · Views: 12
Last edited:

Latest threads

New Articles From Microcontroller Tips

Back
Top