ILI9341 TT Fonts library?

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    Aufgrund technischer Veränderungen ist der Mailverkehr innerhalb des Forums (Private Nachrichten) nur noch eingeschränkt möglich. Die Einschränkung ist notwendig, um zusätzliche Betriebskosten für das Forum zu vermeiden. Näheres zu den Hintergründen im Thread "Aktuelles zum Forum".Wir bitten um Verständnis.

    Hinweis kann nach Kenntnisnahme deaktiviert werden!

    • Die Weiterleitung muss ich noch umkonfigurieren...
      Einstweilen gehen einmal diese Links: Driver, Font

      Ein Minimalbeispiel für das XPlained-128A1 um Fonts darzustellen (ungetestet, habe es aus dem etwas umfangreicheren Sample im Wiki zusammengekürzt) :


      BASCOM-Quellcode

      1. $regfile = "xm128a1def.dat"
      2. $hwstack = 64
      3. $swstack = 64
      4. $framesize = 64
      5. Config Submode = New
      6. Const False = 0
      7. Const True = 1
      8. #if _xmega = True
      9. $crystal = 32000000
      10. $include "XMegaPLL.inc"
      11. #else
      12. $crystal = 16000000
      13. #endif
      14. 'Const Lcd_enable_spi = True
      15. 'Const Lcd_use_soft_spi = True
      16. Const Lcd_enable_16bit = True
      17. $include "ILI9341.inc"
      18. $include "ProportionalFont.inc"
      19. Restore Timesnewroman_10pt ' Mit Truetype-Font-Generator erzeugt (im Download enthalten)
      20. Lcd_tt_loadfont
      21. Enable Interrupts
      22. Lcd_init
      23. Lcd_tt_text "Text" , 10 , 100 , Color_white
      24. Do
      25. Loop
      26. End
      27. $include "data\TimesNewRoman_10pt.inc"
      Alles anzeigen
      Verbindungsschema:
    • ILI9341 TT Fonts library?

      Hallo zaubara,

      Leider bekomme ich beim kompilieren Fehlern die ich nicht korrigieren kann, bin noch Anfänger
      Irgendwie sind die Fehler in ili9341.inc

      Mein display funktioniert mit SPI hardware am PortC vom xmega128
      Config Portc.1 = Output 'LCD CS
      Config Portc.3 = Output 'LCD D/C
      Config Portc.2 = Output 'LCD Reset
      Config Portc.7 = Output 'sck
      Config Portc.4 = Output
      Set Portc.4 '/SS

      Bin dankbar fals es dir möglich ist die ILI9341_sample.bas ohne Fehlemeldungen zu kompilieren

      Gruss
      Fsato
    • Hallo,

      HW-SPI an PortC ist für XMega als default eingestellt, da sollte das funktionieren:

      BASCOM-Quellcode

      1. $regfile = "xm128a1def.dat"
      2. $hwstack = 64
      3. $swstack = 64
      4. $framesize = 64
      5. Config Submode = New
      6. Const False = 0
      7. Const True = 1
      8. $crystal = 32000000
      9. $include "XMegaPLL.inc"
      10. Const Lcd_enable_spi = True
      11. 'Const Lcd_use_soft_spi = True
      12. 'Const Lcd_enable_16bit = True
      13. $include "ILI9341.inc"
      14. $include "ProportionalFont.inc"
      15. Restore Timesnewroman_10pt ' Mit Truetype-Font-Generator erzeugt (im Download enthalten)
      16. Lcd_tt_loadfont
      17. Enable Interrupts
      18. Lcd_init
      19. Lcd_tt_text "Text" , 10 , 100 , Color_white
      20. Do
      21. Loop
      22. End
      23. $include "data\TimesNewRoman_10pt.inc"
      Alles anzeigen


      Die Lib konfiguriert Ports, Pins etc selbst, man muss nur die jeweiligen Einstellungen per Const vor dem Library-Include vornehmen, zb.

      BASCOM-Quellcode

      1. ' Port of the display reset signal
      2. Const Lcd_reset_port = Portf
      3. ' Pin of the display reset signal
      4. Const Lcd_reset_pin = 3
      5. $include "ili9341.inc"

      Hier sind alle verfügbaren Einstellungen erklärt

      Lg
    • Ja, hab den Aufbau wie im Wiki beschrieben (bzw. habe ich DEN Aufbau der im Wiki beschrieben ist ), das sind die Default-Einstellungen in der Library. Funktioniert bei mir mit Soft/Hardware-SPI, 8/16 Bit Parallel.
      Versuchs mal mit Software-SPI, einfach die Const Lcd_use_soft_spi aus dem Beispiel oben auskommentieren.

      Nachdem du aber den Treiber von Hkipnik schon am Laufen hast, kannst du die Proportional-Font-Lib auch damit verwenden (Proportional Fonts # How to use):

      BASCOM-Quellcode: ProportionalFont.inc

      1. ' ### OTHER DISPLAYS ###
      2. !push R10
      3. !push R11
      4. !push R12
      5. !push R13
      6. Lcd_set_pixel(Xpos , Y , Forecolor)
      7. !pop R13
      8. !pop R12
      9. !pop R11
      10. !pop R10
      11. ' ######################
      Alles anzeigen
      Damit verwendet die Font-Routine Setpixel von Hkipniks Treiber, mehr ist nicht nötig.

      Lg

      Nachtrag: Per Default liegt D/C auf Pin 1, lt. deiner Anschlussbelegung oben hast du D/C auf Pin 3.
      Const Lcd_pin_dc = 3 vor dem Library-Include setzt diesen.

      Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von zaubara ()

    • Ich kenne Hkipniks Treiber nicht im Detail, denke aber dass dieser, wie meiner auch, auf XMegas läuft.
      Da es aber ein Displaytreiber ist, sind erweiterte Funktionen wie Bildformate oder Speichermedien nicht enthalten (was meinen betrifft), diese müsste man je nach Anwendung implementieren.
      Enthalten sind aber Routinen um BIN-Bilddaten aus dem Flash bzw. RAM zu zeichnen, die lassen sich dafür gut als Vorlage verwenden.

      Lg
    • Hello.

      I use this display. Does somebody have some color fonts for example digital color fonts or something else color fonts?
      I thought, that I can use monocrome fonts from my projects, but I was wrong.

      Solution from application TT Font maker doesn't work. On Bascom forum I found only color8x8 font and color16x16 fonts.

      It will be my pleasure, if somebody share some diferent color fonts or write what is the best solution to make new color fonts.

      Best regards, M.
    • There are two types of fonts used in Bascom, fixed type fonts (same width for every character, like the two you are referring to, difference between monochrome and color sub types is the data arrangement) and proportional fonts (individual width per character). For the latter, there are two implementations as far is I know, mine and the one from EDC. Which one are you referring to?

      What in particular does not work? Could you share some source code and steps what you've tried so far?

      Br
    • Hello.

      I use this example :

      mcselec.com/index2.php?option=…59&page=viewtopic&t=14405

      It works perfect, but only with color8x8.font-s. I genaraly use clasic (monocrome) displays like 128x64 and prepare fonts for my wishes. For example, digital fonts, special characters, sometimes small icons etc.

      When I tested this example I thought, that I would prepare my own color fonts. But how?

      Best regards, M.
    • I think EDC's editor had the option to export fixed font/color file format.
      The color/monochrome distinction originates from the early days, but is obsolete for TFT displays, both could be drawn in any color. It just depends on how the subroutine drawing the font interprets the font data.

      In my display driver, I've extended the (original format-) font drawing routine by a switch to toggle between the two formats, you could try to port that to O-Family's driver, which it appears you are using.
      As an alternative to Bascom's original font engine, I've created this TrueType to Proportional Font converter (which is discussed in this thread), which uses it's own routines besides the original engine.

      Br