SSD1306 staucht Zeichen auf 1/2 Größe

    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!

    • SSD1306 staucht Zeichen auf 1/2 Größe

      Ich habe folgendes Problem:
      Anzeige SSD1306 Größe: 0,91 zoll OLED Auflösung: 128x32 IIC.
      Wenn ich sie mit dem Beispielprogamm SSD1306-I2C.BAS von MSC ansteuere ist bei der Schrift Font8x8tt.font diese so klein, daß man sie nicht lesen kann.
      Wenn ich eine größere Schriftart nehme z.B. My12_16.font dann sieht man, daß die Zeichen nur in halber Höhe dargestellt werden:
      Die Zeichen dieser Schriftart sind z.B. 14 Pixel hoch, angezeigt werden aber nur 7. Daraus schließe ich, daß nur jede zweite Zeile angezeigt wird.
      Hat jemand eine Idee ?

      BASCOM-Quellcode

      1. $regfile = "m32def.dat"
      2. $crystal = 8000000
      3. $hwstack = 40
      4. $swstack = 40
      5. $framesize = 60
      6. Config Scl = Portc.0 'Konfigurieren von I2C an K20
      7. Config Sda = Portc.1
      8. Config Twi = 400000 ' i2c speed
      9. waitms 200
      10. I2cinit
      11. $lib "i2c_twi.lbx" ' we do not use software emulated I2C but the TWI
      12. $lib "glcdSSD1306-I2C.lib" ' override the default lib with this special one
      13. #if _build < 20784
      14. Dim ___lcdrow As Byte , ___lcdcol As Byte ' dim these for older compiler versions
      15. #endif
      16. Config Graphlcd = Custom , Cols = 128 , Rows = 32 , Lcdname = "SSD1306"
      17. Cls
      18. 'Setfont Font8x8tt ' select font
      19. Setfont My12_16
      20. Lcdat 1 , 1 , "BASCOM-AVR"
      21. Lcdat 4 , 1 , "1995-2015"
      22. End
      23. '$include "font8x8TT.font" ' this is a true type font with variable spacing
      24. $include "my12_16.font"
      Alles anzeigen
      Dateien
      • SSD1306.JPG

        (77,41 kB, 16 mal heruntergeladen, zuletzt: )
    • Versuch mal das Programm

      BASCOM-Quellcode

      1. $regfile = "m32def.dat"
      2. $crystal = 8000000
      3. $hwstack = 40
      4. $swstack = 40
      5. $framesize = 60
      6. Config Scl = Portc.0 'Konfigurieren von I2C an K20
      7. Config Sda = Portc.1
      8. Config Twi = 400000 ' i2c speed
      9. Waitms 200
      10. I2cinit
      11. $lib "i2c_twi.lbx" ' we do not use software emulated I2C but the TWI
      12. $lib "glcdSSD1306-I2C.lib" ' override the default lib with this special one
      13. #if _build < 20784
      14. Dim ___lcdrow As Byte , ___lcdcol As Byte ' dim these for older compiler versions
      15. #endif
      16. I2cstart
      17. I2cwbyte &H78
      18. I2cwbyte &H00
      19. I2cwbyte &HDA
      20. I2cwbyte &H22
      21. I2cstop
      22. Config Graphlcd = Custom , Cols = 128 , Rows = 32 , Lcdname = "SSD1306"
      23. Cls
      24. 'Setfont Font8x8tt ' select font
      25. Setfont My12_16
      26. Lcdat 1 , 1 , "BASCOM-AVR"
      27. Lcdat 4 , 1 , "1995-2015"
      28. End
      29. '$include "font8x8TT.font" ' this is a true type font with variable spacing
      30. $include "my12_16.font"
      Alles anzeigen
    • Bei mir funktioniert

      Quellcode

      1. ....
      2. I2cinit
      3. Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SSD1306"
      4. Waitms 200
      5. 'Wichtig : Erst nach dem Config Graphlcd
      6. I2cstart
      7. I2cwbyte &H78
      8. I2cwbyte &H00 'Page 0
      9. I2cwbyte &HDA 'Set Com HW Cofig
      10. I2cwbyte &H02 'Disable Com L/R Remap
      11. I2cstop
      12. Waitms 200
      Alles anzeigen
      PS Ein Initlcd zerstört die Einstellung