Page 1 of 1

LCD st7735 or other

PostPosted: Mon Sep 20, 2021 2:44 pm
by richardb
I don't know if anyone can help me i have tried the lcd module from the link below for the stm7735 lcb and it seems to work for the example below but when you un comment out the line"Tft.WriteStr(50,50,"*")" it locks up at that point.

http://www.firewing.info/pmwiki.php?n=F ... ser.ST7735




Code: Select all
' set high speed clock...
clock = 80
'#option _gccOptimise = O2

#option TFT_MODEL = ST7735
#option TFT_SCK   =  porte.0'ck26
#option TFT_SDA  = porte.1' ck27
#option TFT_RS   = porte.2'ck28
#option TFT_RW  = porte.3'ck29
#option TFT_CS  = porte.4 'ck30


imports Tft
imports TftGraphic
imports FixedFont

sub main()
   while true
      Tft.Clear() 
      Tft.SetBrushColor(255, 255, 0)
      Tft.FillRect(0, 0, 120, 150)                       
      Tft.SetFont(fixed)
      Tft.SetPenColor(255, 255, 255) 
        'Tft.WriteStr(50,50,"*")
      delayms(100)
   end while
end sub
end




any ideas? ps i have tried a second lcd which i had forgotten that i still had but it does the same.

also can anyone recommend a not too expensive lcd that is known to work with the compiler?


Rich

Re: LCD st7735 or other

PostPosted: Thu Sep 23, 2021 6:58 am
by David John Barker
You could try

Tft.WriteItem(50,50,"*")

for character based writes

Re: LCD st7735 or other

PostPosted: Thu Sep 23, 2021 8:08 am
by richardb
Hi David thanks for the reply, Tft.WriteItem is private and even when made public doesnt have coordinate parameters, but even when making public without coords it is still blocking.


is the blocking likely to be due to a font problem?

Thanks again

Richard

Re: LCD st7735 or other

PostPosted: Thu Sep 23, 2021 8:11 am
by David John Barker
Sorry. I meant to say WriteAt() - which will handle a single char and co-ordinates. It's very difficult to say what the problem may be. I assume WriteStr() works will 2 or more characters?

Re: LCD st7735 or other

PostPosted: Thu Sep 23, 2021 8:39 am
by richardb
no, WriteStr() or writeat doesn't work with either chars or strings.


To be honest i'm assuming ive done something wrong, as i assume other people have used this code, but i just followed the example on the website of copying the zip file into the ied. it seemes to have copied it into the firewing docs folder correctly.


BTW i was going to try other non fixed fonts but none seem to be included with the compiler and i couldnt find anyware to download them even though one of the examples uses "VerdanaFont"


Rich

Re: LCD st7735 or other

PostPosted: Mon Oct 18, 2021 7:41 pm
by richardb
sorry to nudge this but does anyone know where i can download any fonts?

Re: LCD st7735 or other

PostPosted: Tue Oct 26, 2021 12:53 pm
by David John Barker
Firewing has a built in font converter. If the generated fonts do not work, there is likely a problem with your setup