Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:25 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : led 8x8

Author Message
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 05:33pm 10 Dec 2023
Copy link to clipboard 
Print this post

Hello everyone,
I am unfortunately testing this 8x8 matrix for the first time. Is there a defect or is the beta buggy? According to the manual, up to 256 LEDs can be controlled.

> option list
WebMite MMBasic Version 5.08.08b2
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION COLOURCODE ON
OPTION CPUSPEED  252000 'KHz
OPTION WIFI *******, *****************, PICO*******
OPTION TELNET CONSOLE ON
OPTION SDCARD GP13
OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1
> list
Dim b%(63)
SetPin GP5, DOUT
For i=0 To 63
b%(i)=(RGB(red))
Next i
Device WS2812 B, gp5, 64, b%()
>




Edited 2023-12-11 04:45 by homa
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 06:47pm 10 Dec 2023
Copy link to clipboard 
Print this post

I have found another module. The first module is broken! :-(
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 06:54pm 10 Dec 2023
Copy link to clipboard 
Print this post

Look on the bright side. If you ever need a 7x8 module you'll have one. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 07:22pm 10 Dec 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Look on the bright side. If you ever need a 7x8 module you'll have one. :)

HeHe ;-)
 
Bill.b

Senior Member

Joined: 25/06/2011
Location: Australia
Posts: 226
Posted: 08:54pm 11 Dec 2023
Copy link to clipboard 
Print this post

Hi Homa

The command for the WS2812 is

Dim b(63)
SetPin GP5, DOUT
For i=0 To 63
b(i)=(RGB(red))
Next i
BITBANG WS2812 O, GP5, 64, b()

generally I set my colours using the RGB888 format

b(i) = &h(300000) 'Red
&h(003000) ' green
&h(000030)  ' blue

Bill
Edited 2023-12-12 07:00 by Bill.b
In the interests of the environment, this post has been constructed entirely from recycled electrons.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 09:18pm 11 Dec 2023
Copy link to clipboard 
Print this post

hello bill,

the message appears with your code:
[6] Device WS2812 O, GP5, 64, b()
Error : Argument 4 must be an integer array
>


So far my code from above works, the module is simply defective. The second one does.
Thanks anyway.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 09:54pm 11 Dec 2023
Copy link to clipboard 
Print this post

It will error unless it's b%() or it's been DEFined as integer.  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Bill.b

Senior Member

Joined: 25/06/2011
Location: Australia
Posts: 226
Posted: 11:44pm 11 Dec 2023
Copy link to clipboard 
Print this post

Forgot

Dim integer b(64)

Code I use to scroll a message across 4 8X8 displays

Option autorun on
OPTION DEFAULT NONE
OPTION EXPLICIT

DIM integer i, j, count,loop1, loop2, loop3, count2,count1, rndnum
SetPin GP5, DOUT
diM integer LEDcolour1(264)
dim integer ledcolour2(260)

dim integer tempbuff(800)


For i = 0 To 256
   Read  LEDcolour1(i)
 Next i
 For i = 0 To 256
   Read  LEDcolour2(i)
Next i

 senddata
 restore
 ' main program loop starts here
do
 pause 1000
 restore
 For i = 0 To 256
   Read  LEDcolour1(i)
 Next i
  senddata
 pause 2000
 index1
 pause 5000
 index3
 pause 3000
 colour22
 pause 2000
loop

sub index1
pause 2000
for count2 = 0 to 31
senddata
for loop3 =  0 to 8
   tempbuff(loop3) = LEDcolour1(loop3)
 next loop3
 for loop1 = 8 to 248 step 8
   for loop2 = loop1 to loop1 + 8
     LEDcolour1(loop2-8) = LEDcolour1(loop2)
   next loop2
   PAUSE 5
 next loop1
 'load temproy buffer into last row of leds
 for loop3 =  0 to 8
 LEDcolour1(loop3 + 248)= tempbuff(loop3)
   
 next loop3
next count2
end sub

'--------------------------------------------
sub senddata

Bitbang WS2812 B, GP5, 256, LEDcolour1()
end sub
'--------------------------------------------
'---------------------------------------
sub senddata2

Bitbang WS2812 B, GP5, 256, LEDcolour2()
end sub
'--------------------------------------------

sub index3
for loop1 = 0 to 13
 for loop3 = 1 to 249 step 8
   tempbuff(loop3) = LEDcolour1(loop3+6)
  'print tempbuff(loop3);
  next loop3
 
 for  loop2 = 6 to 0 step -1
   For i = loop2 To 248+Loop2 step 8
     LEDcolour1(i+1) = LEDcolour1(i)
  pause 1
   next i
   'senddata
 next loop2
 for loop3 = 1 to 249 step 8
   LEDcolour1(loop3) = tempbuff(loop3)
 'print tempbuff(loop3);
 next loop3
   
 senddata
 
next loop1
end sub

sub colour22
   senddata2
   pause 5000
End sub  
 

' *********************************************************************

' 1  R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h301000,&h000000,&h000000,&h300000,&h300000,&h300000,&h000000,&h000000
Data &h003030,&h000000,&h300000,&h000000,&h000000,&h000000,&h300000,&h000000
Data &h301000,&h000000,&h300000,&h000000,&h000000,&h000000,&h300000,&h000000' c
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h003000,&h003000,&h003000,&h003000,&h000000,&h000000
Data &h003030,&h000000,&h000000,&h000000,&h003000,&h000000,&h003000,&h000000
Data &h301000,&h000000,&h003000,&h003000,&h003000,&h003000,&h000000,&h000000 'a
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h303000,&h303000,&h303000,&h303000,&h303000,&h000000
Data &h003030,&h000000,&h000000,&h000000,&h303000,&h000000,&h303000,&h000000
Data &h301000,&h000000,&h303000,&h303000,&h000000,&h303000,&h000000,&h000000 'r
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h000000,&h000030,&h000030,&h000030,&h000000,&h000000
Data &h003030,&h000000,&h000030,&h000000,&h000000,&h000000,&h000030,&h000000 '0
Data &h301000,&h000000,&h000000,&h000030,&h000030,&h000030,&h000000,&h000000
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h300030,&h300030,&h300030,&h300030,&h300030,&h000000
Data &h003030,&h000000,&h300030,&h000000,&h000000,&h000000,&h000000,&h000000 'u
Data &h301000,&h000000,&h300030,&h300030,&h300030,&h300030,&h300030,&h000000
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h003030,&h000000,&h000000,&h003030,&h000000,&h000000
Data &h003030,&h000000,&h003030,&h000000,&h003030,&h000000,&h003030,&h000000 's
Data &h301000,&h000000,&h000000,&h003030,&h000000,&h000000,&h003030,&h000000
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h303030,&h303030,&h303030,&h303030,&h303030,&h000000
Data &h003030,&h000000,&h303030,&h000000,&h303030,&h000000,&h303030,&h000000
Data &h301000,&h000000,&h303030,&h000000,&h000000,&h000000,&h303030,&h000000 'e
Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h301000,&h000000,&h303000,&h303000,&h303000,&h303000,&h303000,&h000000
Data &h003030,&h000000,&h303000,&h000000,&h000000,&h000000,&h000000,&h000000 'l
Data &h301000,&h000000,&h303000,&h000000,&h000000,&h000000,&h000000,&h000000

Data &h003030,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
 
'----------------------------------------------------------------------------------
Data &h000000,&h000000,&h000000,&h003000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h003000,&h003000,&h003000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h000000,&h003000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h000000,&h003000,&h000000,&h000000,&h000000,&h000000

Data &h000000,&h00000,&h0000000,&h003000,&h000000,&h000000,&h000000,&h000000
' 1  R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h300000,&h000000
Data &h000000,&h000000,&h300000,&h300000,&h300000,&h300000,&h300000,&h000000
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h300000,&h000000' T
 
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h003000,&h003000,&h003000,&h003000,&h003000,&h000000' I
 
  ' R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h000000,&h000030,&h000030,&h000030,&h000000,&h000000
Data &h000000,&h000000,&h000030,&h000000,&h000000,&h000000,&h000030,&h000000 'C
Data &h000000,&h00000,&h0000030,&h000000,&h000000,&h000000,&h000030,&h000000

' 1  R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h303000,&h303000,&h303000,&h303000,&h303000,&h000000
Data &h000000,&h000000,&h000000,&h000000,&h303000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h303000,&h303000,&h000000,&h303000,&h303000,&h000000'K
 
 ' 1 R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h003030,&h003030,&h003030,&h003030,&h003030,&h000000
Data &h000000,&h000000,&h003030,&h000000,&h003030,&h000000,&h003030,&h000000
Data &h000000,&h000000,&h003003,&h000000,&h000000,&h000000,&h003030,&h000000' E

' 1  R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|  
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h303030,&h000000
Data &h000000,&h000000,&h303030,&h303030,&h303030,&h303030,&h303030,&h000000
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h303030,&h000000  'T
 
' 1  R  G  B| R  G  B |R  G  B| R  G  B| R  G  B| R  G  B| R  G  B| R  G  B|
Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h000000,&h300030,&h000000,&h000000,&h300030,&h000000,&h000000 'S
Data &h000000,&h000000,&h300030,&h000000,&h300030,&h000000,&h300030,&h000000
Data &h000000,&h000000,&h000000,&h300030,&h000000,&h000000,&h300030,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
'
'
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000'
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000
Data &h000000,&h00000,&h0000000,&h000000,&h000000,&h000000,&h000000,&h000000

Bill
Edited 2023-12-12 09:53 by Bill.b
In the interests of the environment, this post has been constructed entirely from recycled electrons.
 
k2backhoe
Regular Member

Joined: 04/12/2021
Location: United States
Posts: 46
Posted: 02:18am 20 Dec 2023
Copy link to clipboard 
Print this post

I ordered a bunch of these panels from ALIExpress as they were < $2 each.  3 of 15 were bad in a similar manner.  There was a really good video on the manufacture and test of the WS2812 chips and it showed they did extensive testing of each package.  The testing sorted them into at least 2 quality grades.  AHA!! the lower quality grade chips go to make 8x8 panels for the discount sellers.  I still came out ahead with 12 good panels.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024