Probleme mit 2,4" Display Fehlermeldung in der inc

    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!

    • Probleme mit 2,4" Display Fehlermeldung in der inc

      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 ?

      Quellcode

      1. '*******************************************************************************
      2. 'Display Driver IC ILI9341 320x240 Pixel
      3. '
      4. 'Modus 8Bit
      5. '
      6. 'Landscape and Portrait
      7. '
      8. 'Bascom version 2.0.8.0
      9. 'Date 01.05.2015
      10. '
      11. 'Autor: Hkipnik@aol.com
      12. '
      13. 'Copyright by Hkipnik@aol.com
      14. '
      15. '
      16. '
      17. '
      18. '
      19. ' Hardware: Arduino Uno and ILI9341
      20. '*******************************************************************************
      21. '
      22. ' M328 Display
      23. ' PortB.0 DB8
      24. ' PortB.1 DB9
      25. ' PortD.2 DB10
      26. ' PortD.3 DB11
      27. ' PortD.4 DB12
      28. ' PortD.5 DB13
      29. ' PortD.6 DB14
      30. ' PortD.7 DB15
      31. '
      32. ' RD fest auf 3,3V legen
      33. ' PortC.1 WR
      34. ' PortC.2 RS
      35. ' PortC.3 CS kann auch fest auf GND gelegt werden
      36. ' PortC.4 Reset
      37. '
      38. '
      39. '
      40. '
      41. '
      42. '*******************************************************************************
      43. $regfile = "m328pdef.dat"
      44. $crystal = 16000000
      45. $hwstack = 60
      46. $swstack = 100
      47. $framesize = 100
      48. Config Com1 = 38400 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
      49. '*******************************************************************************
      50. 'Display Mode
      51. '*******************************************************************************
      52. Const Sd_card = 0 'with SD Card = 1 -- without SD Card = 0
      53. Const Lcd_mode = 3 '1=Portrait 2=Portrait 180° 3=landscape 4=landscape 180°
      54. '*******************************************************************************
      55. ' Declare Subs Variables Constants and Hardware Ports
      56. '*******************************************************************************
      57. $include "TFTDriver\ILI9341_declarations8.inc"
      58. '*******************************************************************************
      59. 'Init SD Card
      60. '*******************************************************************************
      61. #if Sd_card = 1
      62. $include "Avr-Dos\Config_MMCSD_HC.bas"
      63. $include "Avr-Dos\Config_AVR-DOS.bas"
      64. #endif
      65. '*******************************************************************************
      66. 'Init the Display
      67. '*******************************************************************************
      68. Lcd_init
      69. Lcd_clear Black
      70. '*******************************************************************************
      71. ' Use for Demo
      72. Dim Temp_str As String * 20
      73. Dim Help_str As String * 10
      74. Dim Dumb As Word
      75. Dim Zahler As Byte
      76. '*******************************************************************************
      77. ' SD Card Info
      78. '*******************************************************************************
      79. #if Sd_card = 1
      80. Init_sd_card 'Init SD Card
      81. Temp_str = "SD Card= " + Str(sd_ok)
      82. Lcd_text Temp_str , 1 , 1 , 2 , Yellow , Black , 1
      83. ' 1 OK
      84. ' 0 Error
      85. Temp_str = "SD Card Typ= " + Str(mmcsd_cardtype)
      86. Lcd_text Temp_str , 1 , 20 , 2 , Yellow , Black , 1
      87. ' 0 can't init the Card
      88. ' 1 MMC
      89. ' 2 SDSC Spec. 1.x
      90. ' 4 SDSC Spec. 2.0 or later
      91. ' 12 SDHC Spec. 2.0 or later
      92. Wait 2
      93. Lcd_clear Black
      94. #endif
      95. '*******************************************************************************
      96. 'Wird nur beim Start Angezeigt
      97. Do
      98. '*******************************************************************************
      99. '*******************************************************************************
      100. ' Portrait Mode
      101. '*******************************************************************************
      102. '*******************************************************************************
      103. #if Lcd_mode = 3 Or Lcd_mode = 4
      104. Lcd_clear Blue
      105. Wait 1
      106. Lcd_text "HAMBURG HBF Abfahrt" , 1 , 1 , 5 , White , Blue ,1
      107. Lcd_text "ICE577" , 1 , 40 , 5 , Blue , White ,1
      108. lcd_text "Berlin HBF" , 90 , 40 , 5 , White , Blue,1
      109. Lcd_text "Gleis 2", 230, 40, 5, White , Blue , 1
      110. Lcd_text "ICE835" , 1 , 65 , 5 , Blue , White , 1
      111. lcd_text "Koeln HBF" , 90 , 65 , 5 , White , Blue , 1
      112. Lcd_text "Gleis 8", 230, 65, 5, White , Blue , 1
      113. Lcd_text "ICE311" , 1 , 90 , 5 , Blue , White , 1
      114. lcd_text "Hagen HBF" , 90 , 90 , 5 , White , Blue , 1
      115. Lcd_text "Gleis 5", 230, 90, 5, White , Blue , 1
      116. Lcd_text "RB3422" , 1 , 115 , 5 , Blue , White , 1
      117. lcd_text "HH-Altona" , 90 , 115 , 5 , White , Blue , 1
      118. Lcd_text "Gleis 4", 230, 115, 5, White , Blue , 1
      119. Lcd_text "RB2821" , 1 , 140 , 5 , Blue , White , 1
      120. lcd_text "Kiel" , 90 , 140 , 5 , White , Blue , 1
      121. Lcd_text "Gleis 3", 230, 140, 5, White , Blue , 1
      122. Lcd_text "RB7231" , 1 , 165 , 5 , Blue , White , 1
      123. lcd_text "Bremen" , 90 , 165 , 5 , White , Blue , 1
      124. Lcd_text "Gleis 7", 230, 165, 5, White , Blue , 1
      125. Lcd_text "RB0815" , 1 , 190 , 5 , Blue , White , 1
      126. lcd_text "Luebeck" , 90 , 190 , 5 , White , Blue , 1
      127. Lcd_text "Gleis 1", 230, 190, 5, White , Blue , 1
      128. Lcd_text "Uhrzeit 13:45" , 60 , 215 , 5 , White , Blue , 1
      129. Wait 60
      130. Lcd_clear Blue
      131. '
      132. #endif
      133. '*******************************************************************************
      134. '*******************************************************************************
      135. '*******************************************************************************
      136. ' Landscape Mode
      137. '*******************************************************************************
      138. '*******************************************************************************
      139. #if Lcd_mode = 1 Or Lcd_mode = 2
      140. Lcd_clear Black
      141. For Dumb = 1 To 10
      142. Help_str = Str(dumb)
      143. Temp_str = Format(help_str , "000")
      144. Temp_str = Temp_str + ".bin"
      145. Lcd_pic_binsd Temp_str , 0 , 0 , 320 , 240
      146. Wait 2
      147. Next
      148. #endif
      149. Loop
      150. End
      151. '*******************************************************************************
      152. #if Sd_card = 1
      153. $include "Avr-Dos\SD_card_init.inc"
      154. #endif
      155. $include "TFTDriver\ILI9341_functions8.inc"
      156. $include "Font\Droidsans16x24.font" 'Font 1
      157. $include "Font\Font12x16.font" 'Font 2
      158. $include "Font\crn20x24.font" 'Font 3
      159. $include "Font\Digital20x32.font" 'Font 4
      160. '$include "Font\Font6x8.font" 'Font 5
      Alles anzeigen