News:

;) This forum is the property of Proton software developers

Main Menu

Problem using ST7735 LCD

Started by Colin G3YHV, Nov 04, 2022, 10:05 AM

Previous topic - Next topic

Colin G3YHV

Hi all. I a have a project which used the little oled screens - worked well
Just re-written it for the ST7735 LCD -  USING st7735Font.inc - the whole thing seems very slow.
Running the latest Positron  and the chip is  the  18F26K22 . the st7735_Cls(Black)  command is slow to clear the screen.
I changed the clock freq from 64 to 16 MHz and it very very slow now ! . Also the RSIN commmand I was using gets corrupted data.
Am I using the correct inc file for this device ?  - 
Colin

John Lawton


top204

#2
Make sure the device is operating at the correct frequency chosen for the compiler to compile for.

The easy way to do this is to set the Baud rate for either HRSout or RSout, and continuously transmit the text: "Hello World" in a loop.

If you see "Hello World" on the serial terminal, the device is operating at the correct frequency, but if random characters are displayed on the serial terminal or no characters, the device is not operating at the frequency that the compiler has been told it is, so things will be slower, or sometimes faster if incorrect the other way around. This is because the compiler sets all its delays and timings required by commands and peripherals, based upon the Declare Xtal directive's value.

Colin G3YHV

Hi Thanks -  the include file I found on the rosetta site did not seem to have a working
clear screen command also missing things like rectangle fill etc.
I found ST7735Font.inc on our group and used that. I will confirm the clock speed is correct.
I would be surprised if it was not. its all set as I set all my programs for this chip  at 64 MHz.
I will do more work  on this later -  off to build a bonfire ready for tomorrow !
Colin

Colin G3YHV

I  checked the clock frequency its set ok at 64MHz -  I double checked  this  using the  hpwm by setting it to 20000 kHz
and  i am getting 20045 kHz  -  which I suspect is ok as I am using the chips internal osc. Still seems to run very slow
and gibberish coming from the rsin command using a routine I have used many times before  -  the source of the serial data
is a gps module ( tried two )  -  the polarity is correct. -  the clear screen command takes about 300 milliseconds to wipe across the screen
not sure whats going on here !
Confused of Bristol

Pepe

If you use the universal library, deleting the screen takes 45ms

Colin G3YHV

Hi Pepe - thanks for your reply
Where do I find the universal library ?
Colin

Pepe

Quote from: atomix on Mar 09, 2022, 05:05 PMUniversal Graphic Library - allows you to work with a variety of displays (monochrome or color).

Interface:
- Software SPI, I2C, 8080 MCU 8-Bit Bus.    (maximum fast implementation)
- Custom User Hardware.

Buffer:
- Monochrome used:  Bytes = (Width * Height) / 8
- Color used: None

Image:
- Supported 16-Bit ( RGB565 ) and 8-Bit, 4-Bit ( Palette with RLE compression )
- RLE compression is based on the format of PCX graphic files and is significantly improved.

Fonts:
- Used X axis fonts
- To create fonts:
If cannot save font with GLCD Font Creator. In order to do that: right click on GLCD Font Creator -> Properties -> Compatibility check Run this program in compatibility mode for: Windows XP.

To use the program "Image_Converter.mf" or "Font_Converter.mf" you need to install LangMF Engine - https://langmf.ru/ftp/LangMF_setup.exe

Dompie