Hallo, ich habe zwei LED Platinen mit dem WS2801 aufgebaut, dazu ein kleines Testprogramm geschrieben. Das Problem ist nun, dass die beiden Strips einzeln für sich funktionieren. Hänge ich die aber aneinander, reagiert der zweite Strip nicht - dh alle LEDs bleiben aus. SDO und CKO sind korrekt mit SDI und CKI verbunden. Masse und VCC ebenfalls. Ich bin etwas ratlos - wer hat evtl einen Tipp? Datenblatt: http://www.dz863.com/datasheet-8391361663-WS2801_3-channel-Constant-Current-Led-Driver-With-Programmable-Pwm-Outputs/
Das Beispielprogramm: $regfile = "m8def.dat" $crystal = 1000000 $hwstack = 40 $swstack = 40 $framesize = 40 Config Spi = Hard , Interrupt = Off , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 1 , Clockrate = 4 , Noss = 0 Spiinit Declare Sub Set_rgb(byval Red As Byte , Byval Green As Byte , Byval Blue As Byte) Dim R1 As Byte Dim R2 As Byte Dim R3 As Byte Do 'init Call Set_rgb(255 , 0 , 0) Waitms 1000 Call Set_rgb(0 , 255 , 0) Waitms 1000 Call Set_rgb(0 , 0 , 255) Waitms 1000 '----------------------- ' testfarben Call Set_rgb(238 , 118 , 33) Waitms 1000 '------------------ Do R1 = Rnd(255) R2 = Rnd(255) R3 = Rnd(255) Call Set_rgb(r1 , R2 , R3) Waitms 1000 Loop Loop 'reihenfolge der bytes bei meiner platine: 1) GRÜN, 2) ROT, 3) BLAU ' setzt die übergebene farbe am spi Sub Set_rgb(byval Red As Byte , Byval Green As Byte , Byval Blue As Byte) Spiout Green , 1 Spiout Red , 1 Spiout Blue , 1 End Sub End
subroutine war falsch...
Sub Set_rgb(byval Red As Byte , Byval Green As Byte , Byval Blue As
Byte)
For I = 1 To Strips
Spiout Green , 1
Spiout Red , 1
Spiout Blue , 1
Next I
End Sub
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.

