Hallo an Alle,
habe ein kleines Programm das ich flashen will und bekomme von Bascom folgende Fehlermeldung
Error : 97 Line : 202 SUB or FUNCTION must be DECLARED first [LCD_PIC_SRAM] , in File : TFTDriver\ILI9341_functions8.inc
Error : 114 Line : 203 LOCAL only allowed in SUB or FUNCTION [ZAL AS WORD , XE AS WORD , YSS AS WORD] , in File : TFTDriver\ILI9341_functions8.inc
hier der Code , weiß evtl jemand was da falsch ist ?
Alles anzeigen
habe ein kleines Programm das ich flashen will und bekomme von Bascom folgende Fehlermeldung
Error : 97 Line : 202 SUB or FUNCTION must be DECLARED first [LCD_PIC_SRAM] , in File : TFTDriver\ILI9341_functions8.inc
Error : 114 Line : 203 LOCAL only allowed in SUB or FUNCTION [ZAL AS WORD , XE AS WORD , YSS AS WORD] , in File : TFTDriver\ILI9341_functions8.inc
hier der Code , weiß evtl jemand was da falsch ist ?
Quellcode
- '*******************************************************************************
- 'Display Driver IC ILI9341 320x240 Pixel
- '
- 'Modus 8Bit
- '
- 'Landscape and Portrait
- '
- 'Bascom version 2.0.8.0
- 'Date 01.05.2015
- '
- 'Autor: Hkipnik@aol.com
- '
- 'Copyright by Hkipnik@aol.com
- '
- '
- '
- '
- '
- ' Hardware: Arduino Uno and ILI9341
- '*******************************************************************************
- '
- ' M328 Display
- ' PortB.0 DB8
- ' PortB.1 DB9
- ' PortD.2 DB10
- ' PortD.3 DB11
- ' PortD.4 DB12
- ' PortD.5 DB13
- ' PortD.6 DB14
- ' PortD.7 DB15
- '
- ' RD fest auf 3,3V legen
- ' PortC.1 WR
- ' PortC.2 RS
- ' PortC.3 CS kann auch fest auf GND gelegt werden
- ' PortC.4 Reset
- '
- '
- '
- '
- '
- '*******************************************************************************
- $regfile = "m328pdef.dat"
- $crystal = 16000000
- $hwstack = 60
- $swstack = 100
- $framesize = 100
- Config Com1 = 38400 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
- '*******************************************************************************
- 'Display Mode
- '*******************************************************************************
- Const Sd_card = 0 'with SD Card = 1 -- without SD Card = 0
- Const Lcd_mode = 3 '1=Portrait 2=Portrait 180° 3=landscape 4=landscape 180°
- '*******************************************************************************
- ' Declare Subs Variables Constants and Hardware Ports
- '*******************************************************************************
- $include "TFTDriver\ILI9341_declarations8.inc"
- '*******************************************************************************
- 'Init SD Card
- '*******************************************************************************
- #if Sd_card = 1
- $include "Avr-Dos\Config_MMCSD_HC.bas"
- $include "Avr-Dos\Config_AVR-DOS.bas"
- #endif
- '*******************************************************************************
- 'Init the Display
- '*******************************************************************************
- Lcd_init
- Lcd_clear Black
- '*******************************************************************************
- ' Use for Demo
- Dim Temp_str As String * 20
- Dim Help_str As String * 10
- Dim Dumb As Word
- Dim Zahler As Byte
- '*******************************************************************************
- ' SD Card Info
- '*******************************************************************************
- #if Sd_card = 1
- Init_sd_card 'Init SD Card
- Temp_str = "SD Card= " + Str(sd_ok)
- Lcd_text Temp_str , 1 , 1 , 2 , Yellow , Black , 1
- ' 1 OK
- ' 0 Error
- Temp_str = "SD Card Typ= " + Str(mmcsd_cardtype)
- Lcd_text Temp_str , 1 , 20 , 2 , Yellow , Black , 1
- ' 0 can't init the Card
- ' 1 MMC
- ' 2 SDSC Spec. 1.x
- ' 4 SDSC Spec. 2.0 or later
- ' 12 SDHC Spec. 2.0 or later
- Wait 2
- Lcd_clear Black
- #endif
- '*******************************************************************************
- 'Wird nur beim Start Angezeigt
- Do
- '*******************************************************************************
- '*******************************************************************************
- ' Portrait Mode
- '*******************************************************************************
- '*******************************************************************************
- #if Lcd_mode = 3 Or Lcd_mode = 4
- Lcd_clear Blue
- Wait 1
- Lcd_text "HAMBURG HBF Abfahrt" , 1 , 1 , 5 , White , Blue ,1
- Lcd_text "ICE577" , 1 , 40 , 5 , Blue , White ,1
- lcd_text "Berlin HBF" , 90 , 40 , 5 , White , Blue,1
- Lcd_text "Gleis 2", 230, 40, 5, White , Blue , 1
- Lcd_text "ICE835" , 1 , 65 , 5 , Blue , White , 1
- lcd_text "Koeln HBF" , 90 , 65 , 5 , White , Blue , 1
- Lcd_text "Gleis 8", 230, 65, 5, White , Blue , 1
- Lcd_text "ICE311" , 1 , 90 , 5 , Blue , White , 1
- lcd_text "Hagen HBF" , 90 , 90 , 5 , White , Blue , 1
- Lcd_text "Gleis 5", 230, 90, 5, White , Blue , 1
- Lcd_text "RB3422" , 1 , 115 , 5 , Blue , White , 1
- lcd_text "HH-Altona" , 90 , 115 , 5 , White , Blue , 1
- Lcd_text "Gleis 4", 230, 115, 5, White , Blue , 1
- Lcd_text "RB2821" , 1 , 140 , 5 , Blue , White , 1
- lcd_text "Kiel" , 90 , 140 , 5 , White , Blue , 1
- Lcd_text "Gleis 3", 230, 140, 5, White , Blue , 1
- Lcd_text "RB7231" , 1 , 165 , 5 , Blue , White , 1
- lcd_text "Bremen" , 90 , 165 , 5 , White , Blue , 1
- Lcd_text "Gleis 7", 230, 165, 5, White , Blue , 1
- Lcd_text "RB0815" , 1 , 190 , 5 , Blue , White , 1
- lcd_text "Luebeck" , 90 , 190 , 5 , White , Blue , 1
- Lcd_text "Gleis 1", 230, 190, 5, White , Blue , 1
- Lcd_text "Uhrzeit 13:45" , 60 , 215 , 5 , White , Blue , 1
- Wait 60
- Lcd_clear Blue
- '
- #endif
- '*******************************************************************************
- '*******************************************************************************
- '*******************************************************************************
- ' Landscape Mode
- '*******************************************************************************
- '*******************************************************************************
- #if Lcd_mode = 1 Or Lcd_mode = 2
- Lcd_clear Black
- For Dumb = 1 To 10
- Help_str = Str(dumb)
- Temp_str = Format(help_str , "000")
- Temp_str = Temp_str + ".bin"
- Lcd_pic_binsd Temp_str , 0 , 0 , 320 , 240
- Wait 2
- Next
- #endif
- Loop
- End
- '*******************************************************************************
- #if Sd_card = 1
- $include "Avr-Dos\SD_card_init.inc"
- #endif
- $include "TFTDriver\ILI9341_functions8.inc"
- $include "Font\Droidsans16x24.font" 'Font 1
- $include "Font\Font12x16.font" 'Font 2
- $include "Font\crn20x24.font" 'Font 3
- $include "Font\Digital20x32.font" 'Font 4
- '$include "Font\Font6x8.font" 'Font 5