LCD st7735 or other

General questions about Firewing...

LCD st7735 or other

Postby richardb » Mon Sep 20, 2021 2:44 pm

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
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: LCD st7735 or other

Postby David John Barker » Thu Sep 23, 2021 6:58 am

You could try

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

for character based writes
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: LCD st7735 or other

Postby richardb » Thu Sep 23, 2021 8:08 am

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
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: LCD st7735 or other

Postby David John Barker » Thu Sep 23, 2021 8:11 am

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?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: LCD st7735 or other

Postby richardb » Thu Sep 23, 2021 8:39 am

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
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: LCD st7735 or other

Postby richardb » Mon Oct 18, 2021 7:41 pm

sorry to nudge this but does anyone know where i can download any fonts?
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: LCD st7735 or other

Postby David John Barker » Tue Oct 26, 2021 12:53 pm

Firewing has a built in font converter. If the generated fonts do not work, there is likely a problem with your setup
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm


Return to Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron

x