View previous topic :: View next topic |
Author |
Message |
albertsm
Joined: 09 Apr 2004 Posts: 6173 Location: Holland

|
Posted: Fri Sep 27, 2019 8:01 pm Post subject: |
|
|
Thank you for this demo. The source is well documented.
And thanks for the demo video, i liked it  _________________ Mark |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Thu May 14, 2020 11:20 am Post subject: |
|
|
The original library had a bug in reading the font parameter [.db 3,16,48,0] which showed the dot counts for [X] and [Y].
Fonts with 16 dots or more were not displayed normally.
I fixed it. |
|
Back to top |
|
 |
raimond_1
Joined: 06 Jun 2018 Posts: 2

|
Posted: Fri Apr 01, 2022 8:29 am Post subject: |
|
|
Hi,
Is there any faster library for this G-LCD?
Does the LIB effect the speed of screen?
Thanks |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Mon Apr 04, 2022 10:53 am Post subject: |
|
|
This LCD needs to send a 2-byte address command, 8 bytes of address data, and 2 bytes of color data to draw one dot.
The 8-bit color data is then pseudo-converted to 16-bit color data, and software SPI communication is used to make the port versatile.
In addition, a conversion operation is added to use BASCOM graphic commands.
This unavoidably results in a very slow drawing speed.
We are rather impressed with the effort that the 8-bit CPU puts into drawing.
If you need fast drawing speed, it is better to choose a parallel type LCD. |
|
Back to top |
|
 |
raimond_1
Joined: 06 Jun 2018 Posts: 2

|
Posted: Fri Apr 08, 2022 10:36 am Post subject: |
|
|
Thanks for your response.
Main issue was on CPU clock fuse bit which it was on 1MHz default of factory.
Changed that to 8MHz and it works much faster now. Next step is the external oscillator.
Quick question. How can I rotate the screen 90'? Like landscape view? |
|
Back to top |
|
 |
mannirisch
Joined: 11 Jul 2019 Posts: 1
|
Posted: Sat Oct 01, 2022 7:02 pm Post subject: |
|
|
Hello,
is it possible to make the fonts larger than 16X16.
Thanks!!
Manfred |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Sun Oct 02, 2022 3:13 am Post subject: |
|
|
It is possible if the number of dots in the font is a multiple of 8. |
|
Back to top |
|
 |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Sun Feb 19, 2023 10:00 pm Post subject: Using the ILI9341 Library with a Atmega2560 |
|
|
Thankyou for your previous help with using your library with a ATmega168. That project is now working well.
I am now been having trouble using an ATmega2560. I have worked on this for a several days before coming to you again.
What works is the program will clear the screen and implement "Line" statements but not "Lcdat" statements. My logic analyzer shows continuous framing errors.
I have included additional notes in the attached program. |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Mon Feb 20, 2023 4:07 am Post subject: |
|
|
Just in case, we will release the latest library that also supports Xmega.
Please give it a try.
Your board seems to run at 16MHz, but the operating voltage for this LCD is 3.3V.
Are the LCD power supply and LCD control signals set to 3.3V? |
|
Back to top |
|
 |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Mon Feb 20, 2023 4:07 pm Post subject: Using updated library |
|
|
I did try the updated library. The line functions still work okay but the data is still a display of all red.
I also tried reducing the clock speed by 8 but that had no affect.
The ILI9341 is powered by 3.3 volts. My ATmega2560 is powered at 5 volts. I use a voltage dividers so my signals to the ILI9341 are limited to 3.3v.
I am thinking of modifying the interface between the ATmega2560 and the ILI9341 to provide a better grade of level shifting (possibly using a TXS0108E) and making it easier for me to connect to both the ILI9341 and my logic analyzer (a Saleae).
So I don't want to take up a lot of your time at this point, but if there is some editing to the library you would like me to try, I can do that.
Thank you. |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Tue Feb 21, 2023 1:06 am Post subject: |
|
|
I also checked the symptoms.
It doesn't seem to be a RAMPZ problem because the flash doesn't occur on normal AVRs with 64K or less or ATXmega128A1.
It seems to be a problem with ATmega2560 or similar chips.
There is an error in the CG data address on the flash that is passed from BASCOM to the library.
{___fonttable} , {___fonttable +1} , {___fonttable +2}
Even if only one character is drawn with the LCDAT command, data in the range of 16 characters or more will be sent.
In addition, there is no abnormality with 8 dot fonts, and symptoms appear with 16 dot fonts.
But embedding an 8-dot font behind a 16-dot font makes even an 8-dot font insane.
Therefore, it seems that there is something incomprehensible about the calculation of the CG address of the flash by the BASCOM itself.
Please contact MCS about this matter. |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Tue Feb 21, 2023 1:44 am Post subject: |
|
|
It's a strange phenomenon, but if you embed an 8-dot font behind a 16-dot font, 16 dots will also be drawn normally.
Code: |
'--------------------------------------------------------------------------------------------------
'
' * Font data *
'
'found font file in C:\MCS\BASCAR2085\Samples\LCDGRAPH as 4/12/2006 FONT file
'copied it to Autopilot\AVR Programming
$include "color16x16.font"
$include "color8x8.font"
' * BGC data *
'
'5011_255_240:
'$bgf "5011_255_240.BGC"
End |
|
|
Back to top |
|
 |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Tue Feb 21, 2023 2:27 am Post subject: Odd |
|
|
Yes, that works for me also. Thank you.
I can't imagine how you came across that solution.
I will now attach my logic analyzer and see how that wave form looks. I will try to send you before and after pictures of the wave forms.
The appearance of the screen before your fix looked very much like what I had with my Atmega168 when the I2C slave was resetting the ILI9341 because I had not followed the rule about not changing the I2C pin assignments. That wasn't my finest hour. |
|
Back to top |
|
 |
O-Family
Joined: 23 May 2010 Posts: 337 Location: Japan

|
Posted: Wed Feb 22, 2023 1:44 am Post subject: |
|
|
Incorporating 8-dot fonts is an accidental workaround, not a perfect solution.
If the capacity of the program or the amount of font data fluctuates, the same symptoms may recur.
The operation check and correction of the compiler by Mr. Mark are required. |
|
Back to top |
|
 |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Mon Mar 20, 2023 8:20 pm Post subject: port selections |
|
|
Yesterday I posted a note regarding my use of a ATMega2560 with the O-Family ILI9341 LCD library.
I used the following ports which was successful
Config Graphlcd = Color , Cs1 = Porta.0 , A0 = Portb.5 , Si = Portb.2 , Sclk = Portb.1
Port B.2 is the default port for MOSI and B.1 is the default port for SCK
I tied RS high
Alan |
|
Back to top |
|
 |
|