Ich hab' jetzt so ein 32x64 RGB display und kann jetzt selber mit so einem display rumspielen. Es handelt sich dabei um so ein Teil, was auch adafruit im Programm hat. adafruit.com/product/2278
Ich steuere es derzeit mit einem atmega32 mit 16Mhz an. Das display hat einen 1/16 scan, das heißt, es müssen 16x Daten in das display geladen und angezeigt werden, bis das komplette display 1x den ganzen Inhalt zeigt. Pro scan werden von den 32 Zeilen 2 Zeilen gleichzeitig angezeigt. Es zeigt sich bei meinen Versuchen, dass eine Wiederholrate der isr, die eben 2 Zeilen zur Anzeige bringt, von 1,15ms schon nötig ist, um ein Flackern zu vermeiden. Nach 16x 1,15ms=18,4ms ist ein Vollbild fertig, ergibt eine Bildfrequenz von 54Hz.
Meine isr braucht dazu 0,25ms, ergibt eine Belastung von 22% (was noch nicht berücksichtig wurde sind die Zeiten für push und pop von den Registern).
Ich kann jetzt 3bit Farben darstellen, es gibt für jede Farbe einen Bildspeicher, pro Farbe 32x8 bytes=256 bytes, alles zusammen dann 768 bytes.
Jetzt lese ich im obigen link:
This matrix has 2048 bright RGB LEDs arranged in a 64x32 grid on the front. On the back there is a PCB with two IDC connectors (one input, one output: in theory you can chain these together) and 12 16-bit latches that allow you to drive the display with a 1:16 scan rate.
These displays are technically 'chainable' - connect one output to the next input - but our Arduino example code does not support this (yet). It requires a high speed processor and more RAM than the Arduino has!
This matrix has 2048 bright RGB LEDs arranged in a 64x32 grid on the front. On the back there are two IDC connectors (one input, one output: in theory you can chain these together) and 12 16-bit latches that allow you to drive the display with a 1:16 scan rate.
These panels require 13 digital pins (6 bit data, 7 bit control) and a good 5V supply, up to 4A per panel. We suggest our 4A regulated 5V adapter and then connecting a 2.1mm jack. Please check out our tutorial for more details!
Comes with:
Of course, we wouldn't leave you with a datasheet and a "good luck!" We have a full wiring diagrams and working Arduino library code with examples from drawing pixels, lines, rectangles, circles and text. You'll get your color blasting within the hour! On an Arduino, you'll need 16 digital pins, and about 3200 bytes of RAM to buffer the 12-bit color image.
Ich interpretiere das so, dass die für jede Farbe 4x den Bildspeicher haben und eben dann mit 4facher Geschwindigkeit die Daten an das display senden, um so eine 4bit PWM hinzukriegen. Jetzt habe ich gedacht, meine isr wäre schnell, die ist aber im Vergleich mit denen ihrer wohl kreuzlahm. Wo kann ich jetzt was verbessern.
Hier das komplette Programm
Matrix-RGB32x64-multi-V0.21.bas
Font_6x8.bas
Font_8x16.bas
Font_10x16.bas
Font_12x16.bas
und hier die isr
Alles anzeigen
Es ist halt so, dass an 6 Eingängen vom display die bits für die Farben anliegen müssen und mit einem gemeinsamen clock reingeschoben werden. Ein Verketten von den Ausgängen der einen Farbe zu den Eingängen der anderen Farben wäre schon auch möglich, bedeutet aber eine 6x so hohe Tacktrate, bis die bits schließlich an der gewünschten Position angekommen sind.
(Der Assemblercode ist übrigens von @Galahat für mich entwickelt worden.)
Die isr ist ja wirklich überschaubar, wo ist jetzt der Trick, dass die Adafruitler so schnell sind?
Ach ja, es geht jetzt nur um ein angeschlossenes display. Mein Programm kann zwar mit dem mega32 bis zu 2 displays betreiben, aber dann braucht die isr halt auch doppelt so lange.
Ich steuere es derzeit mit einem atmega32 mit 16Mhz an. Das display hat einen 1/16 scan, das heißt, es müssen 16x Daten in das display geladen und angezeigt werden, bis das komplette display 1x den ganzen Inhalt zeigt. Pro scan werden von den 32 Zeilen 2 Zeilen gleichzeitig angezeigt. Es zeigt sich bei meinen Versuchen, dass eine Wiederholrate der isr, die eben 2 Zeilen zur Anzeige bringt, von 1,15ms schon nötig ist, um ein Flackern zu vermeiden. Nach 16x 1,15ms=18,4ms ist ein Vollbild fertig, ergibt eine Bildfrequenz von 54Hz.
Meine isr braucht dazu 0,25ms, ergibt eine Belastung von 22% (was noch nicht berücksichtig wurde sind die Zeiten für push und pop von den Registern).
Ich kann jetzt 3bit Farben darstellen, es gibt für jede Farbe einen Bildspeicher, pro Farbe 32x8 bytes=256 bytes, alles zusammen dann 768 bytes.
Jetzt lese ich im obigen link:
This matrix has 2048 bright RGB LEDs arranged in a 64x32 grid on the front. On the back there is a PCB with two IDC connectors (one input, one output: in theory you can chain these together) and 12 16-bit latches that allow you to drive the display with a 1:16 scan rate.
These displays are technically 'chainable' - connect one output to the next input - but our Arduino example code does not support this (yet). It requires a high speed processor and more RAM than the Arduino has!
This matrix has 2048 bright RGB LEDs arranged in a 64x32 grid on the front. On the back there are two IDC connectors (one input, one output: in theory you can chain these together) and 12 16-bit latches that allow you to drive the display with a 1:16 scan rate.
These panels require 13 digital pins (6 bit data, 7 bit control) and a good 5V supply, up to 4A per panel. We suggest our 4A regulated 5V adapter and then connecting a 2.1mm jack. Please check out our tutorial for more details!
Comes with:
- A single 64x32 RGB panel,
- An IDC cable
- A plug in power cable
- We also include 4 mounting screws and mini-magnets (it appears these are often mounted on a magnetic base).
Of course, we wouldn't leave you with a datasheet and a "good luck!" We have a full wiring diagrams and working Arduino library code with examples from drawing pixels, lines, rectangles, circles and text. You'll get your color blasting within the hour! On an Arduino, you'll need 16 digital pins, and about 3200 bytes of RAM to buffer the 12-bit color image.
Ich interpretiere das so, dass die für jede Farbe 4x den Bildspeicher haben und eben dann mit 4facher Geschwindigkeit die Daten an das display senden, um so eine 4bit PWM hinzukriegen. Jetzt habe ich gedacht, meine isr wäre schnell, die ist aber im Vergleich mit denen ihrer wohl kreuzlahm. Wo kann ich jetzt was verbessern.
Hier das komplette Programm
Matrix-RGB32x64-multi-V0.21.bas
Font_6x8.bas
Font_8x16.bas
Font_10x16.bas
Font_12x16.bas
und hier die isr
BASCOM-Quellcode
- 'Interrupt service
- Display_refresh: 'show the memory on the display
- Load Timer0 , Timer0reload
- Incr Page_counter
- If Page_counter > 15 Then Page_counter = 0
- Index_1 = Page_counter * Bytes_in_row
- Index_2 = Index_1 + Channel_offset
- For D_2 = 1 To Dy_num_v
- For D_1 = 1 To Bytes_in_row
- Shift6out Memory_red(index_1) , Memory_green(index_1) , Memory_blue(index_1) , Memory_red(index_2) , Memory_green(index_2) , Memory_blue(index_2)
- Incr Index_1 : Incr Index_2
- Next D_1
- Index_1 = Index_1 + Dy_offset : Index_2 = Index_2 + Dy_offset
- Next D_2
- Pwm2 = 0
- Waitus 20
- P_lat = 1 : P_lat = 0
- P_a = Page_counter.0
- P_b = Page_counter.1
- P_c = Page_counter.2
- P_d = Page_counter.3
- Pwm2 = Brightness 'display on
- Trigger = 1
- Return
- ' R1 G1 B1 R2 G2 B2
- 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 )
- 'MSB first
- $asm
- LDI r17,8
- Loop_shift2out:
- in R16, dout_port_r1
- BST r18,7
- BLD r16,Dout_pin_r1
- Out Dout_port_r1 , R16
- in R16, dout_port_g1
- BST r19,7
- bld r16,Dout_pin_g1
- Out Dout_port_g1 , R16
- in R16, dout_port_b1
- BST r20,7
- bld r16,Dout_pin_b1
- Out Dout_port_b1 , R16
- in R16, dout_port_r2
- BST r21,7
- BLD r16,Dout_pin_r2
- Out Dout_port_r2 , R16
- in R16, dout_port_g2
- BST r22,7
- bld r16,Dout_pin_g2
- Out Dout_port_g2 , R16
- in R16, dout_port_b2
- BST r23,7
- bld r16,Dout_pin_b2
- Out Dout_port_b2 , R16
- SBI shift_clock_Port, shift_clock_Pin
- LSl r18
- LSl r19
- lsl r20
- lsl r21
- lsl r22
- lsl r23
- dec r17
- CBI shift_clock_Port, shift_clock_Pin
- BRnE loop_shift2out ; if = 0 exit
- $end Asm
- End Sub
(Der Assemblercode ist übrigens von @Galahat für mich entwickelt worden.)
Die isr ist ja wirklich überschaubar, wo ist jetzt der Trick, dass die Adafruitler so schnell sind?
Ach ja, es geht jetzt nur um ein angeschlossenes display. Mein Programm kann zwar mit dem mega32 bis zu 2 displays betreiben, aber dann braucht die isr halt auch doppelt so lange.
Raum für Notizen
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------