Ich habe ein Display und verbinde es mit 2560. Die Bildschirme sind blau, rot, grün, aber wenn ich versuche, Text auf das Display zu bringen, erscheint etwas Seltsames.
Mitch64, kannst du mir helfen?
Display All
Mitch64, kannst du mir helfen?
Source Code
- ' Projekt: Demo LED-RGB-Matrix 64x32
- ' Modul: Main.bas
- ' Autor: Mitch64 @ 2024
- ' Erstellt: 02.05.2024
- ' Geändert: 16.05.2024
- ' Version: Beta
- '$regfile = "m328pdef.dat"
- 'za uro mora biti oscilator: 32768 Hz xtal
- '$crystal = 11059200
- '$baud = 9600
- '$baud = 57600
- '$baud = 115200
- $regfile = "m2560def.dat"
- $hwstack = 64
- $swstack = 64
- $framesize = 64
- $crystal = 16000000 ' Quarz
- Config Submode = New
- Config Base = 0
- '$SIM
- 'Waitms 1000
- Config Pinb.7 = Output
- $include "Include\Setup.inc"
- $include "Include\RGB_64x32.inc"
- Wait 1
- ' ----------------------------------------------
- ' Routinen
- ' ----------------------------------------------
- ' ----------------------------------------------
- ' Initialisierung
- ' ----------------------------------------------
- Enable Interrupts
- Call Panel_init()
- Call Panel_setbackcolor(color_black)
- Call Panel_settextcolor(color_red)
- 'Call Panel_Clear()
- 'Break
- ' Call Panel_Fill(COLOR_BLUE)
- ' Call Panel_SetPixel(0 , 0 , COLOR_RED)
- ' Call Panel_SetPixel(1 , 0 , COLOR_GREEN)
- ' Call Panel_SetPixel(2 , 0 , COLOR_BLUE)
- ' Call Panel_SetPixel(0 , 16 , COLOR_RED)
- ' Call Panel_SetPixel(1 , 16 , COLOR_GREEN)
- ' Call Panel_SetPixel(2 , 16 , COLOR_BLUE)
- 'Call Panel_Fill(COLOR_BLUE)
- 'Wait 1
- Call Panel_setfont(font8x8) ' Font setzen
- 'Call Panel_setfont(my6_8)
- ' Call Panel_SetChar(10 , 10 , 65 )
- Call Panel_settextcolor(color_blue)
- Call Panel_settext(3 , 3 , "Bascom-AVR")
- Wait 3
- 'Call Panel_SetTextColor(COLOR_GREEN)
- 'Call Panel_SetText(7 , 9 , "Mai 2024")
- 'Call Panel_SetFont(font8x8)
- 'Call Panel_SetTextColor(COLOR_CYAN)
- 'Call Panel_SetText(10 , 26 , "Mitch64")
- ' ------------------------------------------------------------------
- ' Hauptschleife
- ' ------------------------------------------------------------------
- ' Call Panel_SetTextColor(COLOR_RED)
- ' Call Panel_SetText(1 , 1 , "Demo RGB" )
- ' Call Panel_SetTextColor(COLOR_GREEN)
- ' Call Panel_SetText(1 , 9 , "Matrix 64x32 Px" )
- ' Call Panel_SetTextColor(COLOR_CYAN)
- ' Call Panel_SetFont(font8x8)
- 'Call Panel_SetFont(Arial_15x17)
- 'Call Panel_SetFont(Tahoma_15x18)
- 'Call Panel_SetFontHeight(16)
- 'Call Panel_SetTextColor(COLOR_RED)
- 'Call Panel_SetBackColor(COLOR_BLUE)
- 'Call Panel_SetText(1 , 1 , "AB0Q")
- 'Call Panel_SetFont(Arial_15x17)
- Do
- NOP
- ' For i = 64 to -64 Step -1
- ' 'Call Panel_Clear()
- ' Call Panel_SetText(i , 20 , "Bascom-AVR ")
- ' Waitms 100
- ' Next
- ' Incr _PanelTextColor
- ' If _PanelTextColor >= 8 then _PanelTextColor = 1
- Wait 1
- Call Panel_fill(color_blue)
- Wait 1
- Call Panel_fill(color_red)
- Wait 1
- Call Panel_fill(color_green)
- Wait 1
- Call Panel_fill(color_black)
- Wait 1
- 'Call Panel_settextcolor(color_red)
- 'nop
- 'Call Panel_settext(0 , 3 , "Bascom-AVR")
- 'Call Panel_settext(7 , 9 , "Aug 2024")
- 'Wait 1
- Call Panel_settextcolor(color_cyan)
- Waitms 100
- Call Panel_setfont(font8x8)
- Waitms 100
- Call Panel_settext(1 , 8 , "Bascom-AVR")
- Wait 4
- Loop
- ' ----------------------------------------------
- ' ----------------------------------------------
- $include "Fonts\my6_8.font"
- $include "Fonts\font8x8.font"
- $include "Fonts\Font5x5.font"
- $include "Fonts\my12_16.font"
- '$Include "Fonts\Arial_15x17.font"
- $include "Fonts\Tahoma_15x18.font"