RGB Matrix module 20x40 1/5 scan GKGD - error of display of the image

    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!

    • das Bild in post 62. Der obere Teil vom Text wird in der oberen Hälfte des displays dargestellt, diese Hälfte wurde bei anderen displays auch von der anderen Elektronikhälfte bedient. Das kann jetzt hier eben anders sein. Wenn du mit diesem code aus post 62 zusätzlich einen Text auf Zeile9 stellst, dann müsste der auch aufgetrennt auf der unteren und oberen displayhälte verteilt werden. Wenn meine Theorie stimmt.
      Was auch noch nicht stimmt ist der Start von index_1 und daß auch jedes mal 10 bytes ausgegeben werden.
      Raum für Notizen

      -----------------------------------------------------------------------------------------------------

      -----------------------------------------------------------------------------------------------------
    • tschoeatsch schrieb:

      die übliche Verteilung gemäß eines Musters dient zur Verhinderung eines Flackereffektes.
      Ja, leider scheint sie nicht Herstellerübergreifend gleich zu behandelt zu werden. Der Bildspeichermurks um die Adressen sowie ob alle genutzt werden herauszufinden. Was ja bei einigen Ziffern zur unbegründeten Vorfreude führte. Das mit der Base kann man halten wie man will . Mir persönlich gefällt null besser: Bits werden ab null gezählt, die Page pins beginnen bei null (Obwohl Pagenummer 1 ist )Und bei Harware erwachte ich einfach nicht das bei 8 drei Pins Saft haben :D

      SAMEGO schrieb:

      chaotic pattern and flicker of many pixels
      caotic pattern are wished. Flicker not. you have an image?
    • tschoeatsch schrieb:

      das Bild in post 62. Der obere Teil vom Text wird in der oberen Hälfte des displays dargestellt, diese Hälfte wurde bei anderen displays auch von der anderen Elektronikhälfte bedient. Das kann jetzt hier eben anders sein. Wenn du mit diesem code aus post 62 zusätzlich einen Text auf Zeile9 stellst, dann müsste der auch aufgetrennt auf der unteren und oberen displayhälte verteilt werden. Wenn meine Theorie stimmt.
      Was auch noch nicht stimmt ist der Start von index_1 und daß auch jedes mal 10 bytes ausgegeben werden.
      How do I fix this?
    • To use Display_refresh?

      Quellcode

      1. Display_refresh:
      2. Load Timer2 , Timer2reload
      3. If Page_counter < 4 Then
      4. Incr Page_counter
      5. Else
      6. Page_counter = 0
      7. End If
      8. Index_1 = 5 - Page_counter
      9. For D_1 = 1 To 9
      10. Index_2 = Index_1 + 5
      11. Shift6out Memory_red(index_2) , Memory_green(index_2) , Memory_blue(index_2) , Memory_red(index_1) , Memory_green(index_1) , Memory_blue(index_1)
      12. Index_1 = Index_1 + 10
      13. Next D_1
      14. Index_2 = Index_1 + 5
      15. Shift6out Memory_red(index_2) , Memory_green(index_2) , Memory_blue(index_2) , Memory_red(index_1) , Memory_green(index_1) , Memory_blue(index_1)
      16. Pwm1b = 0
      17. Waitus 100
      18. P_lat = 1 : P_lat = 0
      19. P_a = Page_counter.0
      20. P_b = Page_counter.1
      21. P_c = Page_counter.2
      22. Pwm1b = Brightness
      23. Trigger = 1
      24. Return
      Alles anzeigen
    • Quellcode

      1. Text = "374 2"
      2. Call Set_text_6_8(0 , 0 , Green)

      Quellcode

      1. Display_refresh:
      2. Load Timer2 , Timer2reload
      3. If Page_counter < 4 Then
      4. Incr Page_counter
      5. Else
      6. Page_counter = 0
      7. End If
      8. Index_1 = 4 - Page_counter
      9. For D_1 = 1 To 9
      10. Index_2 = Index_1 + 5
      11. Shift6out Memory_red(index_2) , Memory_green(index_2) , Memory_blue(index_2) , Memory_red(index_1) , Memory_green(index_1) , Memory_blue(index_1)
      12. Index_1 = Index_1 + 10
      13. Next D_1
      14. Pwm1b = 0
      15. Waitus 100
      16. P_lat = 1 : P_lat = 0
      17. P_a = Page_counter.0
      18. P_b = Page_counter.1
      19. P_c = Page_counter.2
      20. Pwm1b = Brightness
      21. Trigger = 1
      22. Return
      Alles anzeigen
      image_21.jpg
    • tschoeatsch schrieb:

      kannst du bitte den kompletten code von den letzten Bildern hier einstellen

      Quellcode

      1. '20x40 Ledmatrixes RGB, 1_5 scan
      2. $regfile = "m328def.dat"
      3. $crystal = 16000000
      4. $hwstack = 40
      5. $swstack = 16
      6. $framesize = 32
      7. Const Dy_num_h = 1 'displays in a horizontal direction
      8. Const Dy_num_v = 1 'displays in the vertical direction
      9. Const Bytes_in_row = 5 * Dy_num_v
      10. Const Row_num = 20 * Dy_num_h
      11. Const Row_num1 = Row_num - 1
      12. Const Mem_size = Row_num * Bytes_in_row
      13. Const Mem_size_1 = Mem_size - 1
      14. Const Dy_offset = Dy_num_v * 100
      15. Const Channel_offset = 10 * Bytes_in_row
      16. P_r1 Alias Portd.5 : Config P_r1 = Output : Dout_port_r1 Alias Portd : Const Dout_pin_r1 = Pd5
      17. P_g1 Alias Portd.7 : Config P_g1 = Output : Dout_port_g1 Alias Portd : Const Dout_pin_g1 = Pd7
      18. P_b1 Alias Portd.6 : Config P_b1 = Output : Dout_port_b1 Alias Portd : Const Dout_pin_b1 = Pd6
      19. P_r2 Alias Portc.4 : Config P_r2 = Output : Dout_port_r2 Alias Portc : Const Dout_pin_r2 = Pc4
      20. P_g2 Alias Portc.3 : Config P_g2 = Output : Dout_port_g2 Alias Portc : Const Dout_pin_g2 = Pc3
      21. P_b2 Alias Portc.2 : Config P_b2 = Output : Dout_port_b2 Alias Portc : Const Dout_pin_b2 = Pc2
      22. P_a Alias Portc.0 : Config P_a = Output
      23. P_b Alias Portc.1 : Config P_b = Output
      24. P_c Alias Portb.0 : Config P_c = Output
      25. P_ckl Alias Portb.5 : Config P_ckl = Output
      26. P_lat Alias Portb.3 : Config P_lat = Output
      27. P_oe Alias Portb.2 : Config P_oe = Output
      28. Shift_clock_port Alias Portb : Const Shift_clock_pin = Pb5
      29. Config Base = 0
      30. Const Timer2reload = 71000
      31. Config Timer2 = Timer , Prescale = 256
      32. Load Timer2 , Timer2reload
      33. On Ovf2 Display_refresh
      34. Enable Ovf2
      35. Start Timer2
      36. 'PWM ************************************************** *************************
      37. Config Timer1 = Pwm , Pwm = 8 , Compare B Pwm = Clear Down , Prescale = 1
      38. '************************************************* ******************************
      39. Dim Memory_red(mem_size) As Byte , Memory_green(mem_size) As Byte , Memory_blue(mem_size) As Byte 'memory red/green
      40. Dim Page_counter As Byte
      41. Dim D_1 As Word
      42. Dim Index_1 As Word , Index_2 As Word
      43. Dim Character_column As Byte
      44. Dim Font_byte_low As Byte
      45. Dim N_1 As Word
      46. Dim M_1 As Word , M_2 As Word , M_22 As Word
      47. Dim Sign As String * 1
      48. Dim Tab_start As Word 'Startwert der Fonttabelle
      49. Dim X1 As Word
      50. Dim Inverting As Bit
      51. Dim Speed As Word
      52. Dim Text As String * 15
      53. Dim Max_baseline As Word
      54. Dim Startbyte_low As Word , Bit_num As Byte
      55. Dim Trigger As Bit
      56. Dim Inv1 As Bit , Inv As Bit
      57. Dim Color As Byte , Red As Byte , Green As Byte , Blue As Byte , Yellow As Byte , Magenta As Byte , Cyan As Byte , White As Byte
      58. Dim Brightness As Byte
      59. Declare Sub Shift6out(byreg R18 As Byte , Byreg R19 As Byte , Byreg R20 As Byte , Byreg R21 As Byte , Byreg R22 As Byte , Byreg R23 As Byte )
      60. Declare Sub Set_text_6_8(byval X As Word , Byval Y As Word , Byval Color As Byte)
      61. Red = 1 : Green = 2 : Yellow = 3 : Blue = 4 : Magenta = 5 : Cyan = 6 : White = 7
      62. '**************************************************
      63. 'user settings
      64. Inverting = 0
      65. '**************************************************
      66. Dim H As Byte , B_1 As Byte
      67. Brightness = 50
      68. Gosub Clear_memory
      69. Enable Interrupts
      70. Text = "374 2"
      71. Call Set_text_6_8(0 , 0 , Green)
      72. Call Set_text_6_8(0 , 9 , Red)
      73. Do
      74. Loop
      75. End
      76. Display_refresh:
      77. Load Timer2 , Timer2reload
      78. If Page_counter < 4 Then
      79. Incr Page_counter
      80. Else
      81. Page_counter = 0
      82. End If
      83. Index_1 = 4 - Page_counter
      84. For D_1 = 1 To 9
      85. Index_2 = Index_1 + 5
      86. Shift6out Memory_red(index_2) , Memory_green(index_2) , Memory_blue(index_2) , Memory_red(index_1) , Memory_green(index_1) , Memory_blue(index_1)
      87. Index_1 = Index_1 + 10
      88. Next D_1
      89. Pwm1b = 0
      90. Waitus 100
      91. P_lat = 1 : P_lat = 0
      92. P_a = Page_counter.0
      93. P_b = Page_counter.1
      94. P_c = Page_counter.2
      95. Pwm1b = Brightness
      96. Trigger = 1
      97. Return
      98. ' R1 G1 B1 R2 G2 B2
      99. Sub Shift6out(byreg R18 As Byte , Byreg R19 As Byte , Byreg R20 As Byte , Byreg R21 As Byte , Byreg R22 As Byte , Byreg R23 As Byte )
      100. $asm
      101. LDI r17,8
      102. Loop_shift2out:
      103. in R16, dout_port_r1
      104. BST r18,0
      105. BLD r16,Dout_pin_r1
      106. Out Dout_port_r1 , R16
      107. in R16, dout_port_g1
      108. BST r19,0
      109. bld r16,Dout_pin_g1
      110. Out Dout_port_g1 , R16
      111. in R16, dout_port_b1
      112. BST r20,0
      113. bld r16,Dout_pin_b1
      114. Out Dout_port_b1 , R16
      115. in R16, dout_port_r2
      116. BST r21,0
      117. BLD r16,Dout_pin_r2
      118. Out Dout_port_r2 , R16
      119. in R16, dout_port_g2
      120. BST r22,0
      121. bld r16,Dout_pin_g2
      122. Out Dout_port_g2 , R16
      123. in R16, dout_port_b2
      124. BST r23,0
      125. bld r16,Dout_pin_b2
      126. Out Dout_port_b2 , R16
      127. SBI shift_clock_Port, shift_clock_Pin
      128. LSR r18
      129. LSR r19
      130. lsr r20
      131. lsr r21
      132. lsr r22
      133. lsr r23
      134. dec r17
      135. CBI shift_clock_Port, shift_clock_Pin
      136. BRnE loop_shift2out
      137. $end Asm
      138. End Sub
      139. Clear_memory:
      140. For N_1 = 0 To Mem_size_1
      141. Memory_red(n_1) = 0
      142. Memory_green(n_1) = 0
      143. Memory_blue(n_1) = 0
      144. Next N_1
      145. Return
      146. Sub Set_text_6_8(byval X As Word , Byval Y As Word , Byval Color As Byte)
      147. Local Col As Word
      148. '6x8font
      149. Max_baseline = Row_num - 8
      150. If Y > Max_baseline Then Y = Max_baseline
      151. Inv1 = Inverting Xor Inv
      152. For M_1 = 1 To Len(text)
      153. Sign = Mid(text , M_1 , 1) 'Only one letter
      154. Tab_start = Asc(sign)
      155. Tab_start = Tab_start - 32
      156. Tab_start = Tab_start * 6 'Starting point in the font table
      157. For Character_column = 0 To 5
      158. Bit_num = X Mod 8 'bit-number of byte
      159. Col = X / 8 'number of column
      160. Startbyte_low = Col * Row_num
      161. Startbyte_low = Startbyte_low + Y
      162. If Startbyte_low > Mem_size_1 Then Exit Sub 'there is no space, you are ready
      163. X1 = Tab_start + Character_column
      164. Font_byte_low = Lookup(x1 , Font_6x8)
      165. For M_2 = 0 To 7
      166. M_22 = Startbyte_low + M_2
      167. If Color.0 = 1 Then 'red
      168. If Inv1 = 1 Then
      169. Memory_red(m_22).bit_num = Not Font_byte_low.m_2
      170. Else
      171. Memory_red(m_22).bit_num = Font_byte_low.m_2
      172. End If
      173. Else
      174. Memory_red(m_22).bit_num = Inverting
      175. End If
      176. If Color.1 = 1 Then 'green
      177. If Inv1 = 1 Then
      178. Memory_green(m_22).bit_num = Not Font_byte_low.m_2
      179. Else
      180. Memory_green(m_22).bit_num = Font_byte_low.m_2
      181. End If
      182. Else
      183. Memory_green(m_22).bit_num = Inverting
      184. End If
      185. If Color.2 = 1 Then 'blue
      186. If Inv1 = 1 Then
      187. Memory_blue(m_22).bit_num = Not Font_byte_low.m_2
      188. Else
      189. Memory_blue(m_22).bit_num = Font_byte_low.m_2
      190. End If
      191. Else
      192. Memory_blue(m_22).bit_num = Inverting
      193. End If
      194. Next M_2
      195. Incr X
      196. Next Character_column
      197. Next M_1
      198. End Sub
      199. Font_6x8:
      200. Data 0 , 0 , 0 , 0 , 0 , 0 ' <SPACE>
      201. Data 0 , 0 , 96 , 250 , 96 , 0 ' !
      202. Data 0 , 224 , 192 , 0 , 224 , 192 ' "
      203. Data 0 , 48 , 64 , 254 , 64 , 48 ' #
      204. Data 0 , 24 , 4 , 254 , 4 , 24 ' $
      205. Data 0 , 16 , 56 , 84 , 84 , 16 ' %
      206. Data 0 , 16 , 84 , 84 , 56 , 16 ' &
      207. Data 0 , 0 , 224 , 192 , 0 , 0 ' <ZAP>
      208. Data 48 , 96 , 255 , 255 , 96 , 48 ' (
      209. Data 12 , 6 , 255 , 255 , 6 , 12 ' )
      210. Data 24 , 60 , 126 , 90 , 24 , 24 ' *
      211. Data 16 , 16 , 124 , 16 , 16 , 0 ' +
      212. Data 0 , 0 , 7 , 6 , 0 , 0 ' ,
      213. Data 0 , 16 , 16 , 16 , 16 , 16 ' -
      214. Data 0 , 0 , 6 , 6 , 0 , 0 ' .
      215. Data 2 , 4 , 8 , 16 , 32 , 64 ' /
      216. Data 0 , 124 , 138 , 146 , 162 , 124 ' 0
      217. Data 0 , 0 , 66 , 254 , 2 , 0 ' 1
      218. Data 0 , 70 , 138 , 146 , 146 , 98 ' 2
      219. Data 0 , 68 , 146 , 146 , 146 , 108 ' 3
      220. Data 0 , 24 , 40 , 72 , 254 , 8 ' 4
      221. Data 0 , 228 , 162 , 162 , 162 , 156 ' 5
      222. Data 0 , 60 , 82 , 146 , 146 , 12 ' 6
      223. Data 0 , 192 , 142 , 144 , 160 , 192 ' 7
      224. Data 0 , 108 , 146 , 146 , 146 , 108 ' 8
      225. Data 0 , 96 , 146 , 146 , 148 , 120 ' 9
      Alles anzeigen
    • Pluto25 schrieb:

      SAMEGO schrieb:

      Call Set_text_6_8(0 , 0 , Green)
      Call Set_text_6_8(0 , 9 , Green)
      this shifted the hole byte 9 steps - and the matrix 6 up and 9 left ??What hapend:
      call Set_text_6_8(0 , 0 , Green)
      call Set_text_6_8(6 , 0 , Green){red}


      Which code You use this time (image 22,23)?
      the code from a post 98

      Quellcode

      1. Text = "374 2"
      2. Call Set_text_6_8(0 , 0 , Green)
      3. Call Set_text_6_8(6 , 0 , Red)
      image_24.jpg

      this module P8 GKGD 20x40 Module

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von SAMEGO ()