Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:41 25 Nov 2025 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 : PIO-Prog for Hub75 display

     Page 2 of 5    
Author Message
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 05:54am 09 Oct 2025
Copy link to clipboard 
Print this post

Thanks, Don.
Sorry that the change didn't work. I was able to reproduce the error by reducing the dummy bytes, which is why I tried it.
The P4 displays I ordered should arrive next week. I'll continue researching on my own for now.
If they don't have this problem, I'll be happy to get back to you.

I know the problem with brightness and the camera. The images don't reflect reality.

You create very attractive displays. Where do you get the time and temperature from? Do you synchronize the time continuously with your source or just once a day?

There is still an error in my program. I made the transfers for the hours too simple. It was probably too late in the evening. I have improved it in the WS2812 version for now.

Regards
Albert
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2971
Posted: 06:06am 09 Oct 2025
Copy link to clipboard 
Print this post

Gday Albert, All

I am really impressed with your demos Albert.

I hope to have a play with it soon, I have ordered 2 displays (both cheap indoor to test) 1 is a P2.5 64x64 square display the other is a P4 64x32. I am keen to see how they go.

Regards,

Mick (The big one)


.
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5485
Posted: 09:53am 09 Oct 2025
Copy link to clipboard 
Print this post

Albert,

I am not sure this is new to you, but do you know that PIO can use a ring buffer ?
It will endless send the content of that buffer without MMBasic interference. So you do not need TX DMA interrupts.

I use this in the logic analyzer (a ring buffer is being filled waiting for a trigger) and a function generator (a ringbuffer is endless played with sine wave data in it). The analog output is generated from a ladder DAC connected to GPIO pins.

Attached is the function generator core. It uses the ring buffer and TX DMA. But the TX DMA returns after 2^32 loops (&hffffffff). I think in current MMBasic, if you enter for "repeat" the value 0, it will loop indefinite.


sin_gen_test_pkd.zip


Regards,

Volhout

P.S. If you start experimenting with it, take notice of the fact that the ring buffer should start at specific address in memory. That is best achieved if you make sure the ring buffer is the first variable array you define.
Edited 2025-10-09 20:03 by Volhout
PicomiteVGA PETSCII ROBOTS
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 11:32am 09 Oct 2025
Copy link to clipboard 
Print this post

Hi Volhout,

Thank you for your support.
I know the ring-buffer, but I did not know how I could change the data in it, during the PIO use them. As long as the data does not change, it would be the best solution, but what if they do.
From your SineGen-example, you stop the PIO, first checking if it runs.
Is the PIO stopping at a defined read-position or can I check where it is?
Where will the PIO start after "Pio init machine"? I think not at the last data-pos.

I'm going to give it a try, somewhere there is a solution. Possible a change in the firmware by handling the IRQ.
 
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 48
Posted: 11:49am 09 Oct 2025
Copy link to clipboard 
Print this post

Hi Albert,

The clock display I built uses a DS3231 as the RTC.  There is a fantastic code example called “Super Clock” on Geoff’s website.

https://geoffg.net/SuperClock.html

The temperature display is from a AHT10 module.  These are available on Ebay, and are very cheap, but do have very good accuracy.  I used the code posted by phil99.  Also an excellent code example.  

https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=16276

The display if in Fahrenheit and is displayed with 2 decimal points.    That’s likely to much information for a general display, however the one pictured is setup in my work shop.  

Don
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5485
Posted: 11:52am 09 Oct 2025
Copy link to clipboard 
Print this post

Hi Albert,

For MMBasic the ring buffer looks like a linear file. When you start the DMA it will start from the beginning of the array. Only at the end it will wrap to the beginning. But for MMBasic it simply is a linear array.

I haven't tried it, but I would not be surprized that you can write changes to the array while the PIO DMA is running.

EDIT: just tested, and you can MATH SET xx,array() while TX DMA is running. /EDIT

The only thing important is to keep display and array in sync.

EDIT : One way to do that is to make the sync signal become part of the array. Then data and sync signal will always be aligned. /EDIT

Volhout
Edited 2025-10-09 22:08 by Volhout
PicomiteVGA PETSCII ROBOTS
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 01:04pm 09 Oct 2025
Copy link to clipboard 
Print this post

Hi,

@ Volhout,
the sync in the data is a good idea. I had one for EndOfLine, i will try an addtional EndOfPage or something like that. Thanks  

@Don,
thanks for the links. Sometimes it's difficult to keep track of everything in the forum and find the things that interest you, especially if you don't know about them yet.  

@Mick,
I will program a version for a 1/32 scan-display soon. Also I will change the structure of the workarray to save memory and to increase the speed, I hope .  
The connection will be also changed to make it easier to expand the colordeep if wished and possible switchable.

I think ,it is still a project in development.

Regards

Albert
 
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 48
Posted: 03:22pm 11 Oct 2025
Copy link to clipboard 
Print this post

Hi Albert,

I don’t know if you looked at Peter’s post regarding the HUB75 back in 2016.  

He coded a text interface that worked the same as if you are writing to a LCD display.  

Link to post   https://www.thebackshed.com/forum/ViewTopic.php?TID=8791

TEXT 2,16,"geoffg.net",lm,8,1,RGB(red)

This provided a very easy way to write text to the 64X32 LED pannle.

Don
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 08:36pm 11 Oct 2025
Copy link to clipboard 
Print this post

Hi Don,
I already knew about the thread.
Peter uses CSubs for this, which I still need to look into.

Best regards,
Albert
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 08:11pm 14 Oct 2025
Copy link to clipboard 
Print this post

Hi Volhout,

I made a try with Ring-Buffer for the Hub75. For the sync I had to expand the PIO in two parts. When running all is perfect, no flickering no shaking, also the systemspeed increase, because of no interups with no reinit the PIO.

The video shows a RP2040 @48MHz and it works very well.

Hub75TwoPiosRing.zip


But there are some problems after breaking the program (ctrl+c).
First the PIO continue working, the display continues to show last content. That is no great problem. After entering the edit-mode this stops.
But when I start the program again, it hangs up. "MM.Info(PIO TX DMA)" is 1, the PIO TX DMA looks like it is still running. "PIO DMA TX OFF" or "PIO stop 1,0" have no effect.
For an other run the CPU must be resetted !

I am not lucky with this. What am I doing wrong? Has anyone an idea what the problem is?

Albert
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 08:14pm 19 Oct 2025
Copy link to clipboard 
Print this post

Hi Don,

I got the displays and was able to reproduce the error. I tried a few settings with it, but only the Hub75 version with the second state machine fixed the error. Also it reduces flickering so much that an RP2040 can run it at 48 MHz CPU speed.



I once created a program version with it. Just remove the demo outputs at the beginning.
TwoSmMorph.zip

@Mick
Since I also received a 64x64 display, I created an extension for it as well and put together a short demo just for fun. The used functions are very sloppily done, because there is no security checks at the memory boundaries.

See the video in the zip file. The rp2040 runs @100MHz.

HubDemo64x64.zip

Greetings
Albert
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2971
Posted: 01:16am 20 Oct 2025
Copy link to clipboard 
Print this post

Hi Albert, All,

My 64 x 64 2.5mm display came as well as my 64 x 32 4mm display.

I didn't realise I also bought a small controller PCB with one of them (about $10AU inc post)

It is a HD-WF2 PCB (pity the language is in Indonesian but that is the module).

There is some impressive software but the good ones cost an Arm and a leg (plus a testicle or 2)

LED Banner (looks great but costs $15 per week... Crikey)
LED-Lite (looks pretty decent but is similary dear at $* per week)

LEDart is free and does some decent stuff but I find it very awkward, I have been looking for a user manual for the program with no success yet.

I am confused with the display settings though and am surprised that the setting for the 64x64 doesn't work with the 64x32 and vice versa.

The 64x32 display I have set to a scanning method of P5_1R1G1B_64x32_16S_BGR
and
The 64x64 display I have set to a scanning method of {C6}P10 1R/(1R1G) 1/4S HUB12 32x16(P10)

The 64x64 setting doesn't seem right but it works. It is all very confusing but I will play with these options a bit.

You have to select the settings from a list you cant just enetr the various display options

Regards,

Mick (the Big one)

EDIT***
When I get time I will try your code.



.
Edited 2025-10-20 11:18 by bigmik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 04:29pm 26 Oct 2025
Copy link to clipboard 
Print this post

Hi all,

I try a new version with 12bit colordepth.
I also add some functional features, text could have a backgroundcolor, also a clearcolor could be used. The Stringbox can use x-offsets.
I still use no CFunctions. Without the PIO all is Basic and hopefully understandable.



By trying the pictures: I'm not sure if dithering is necessary and practical here. There are very few pixels at a resolution of 64x64.
At the moment I use 24bit-bmps, they are very easy to handle. The lower 4bits are removed while loading.

Hub75_12bit.zip

I'm excited to see what you can do with it.

Albert
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 721
Posted: 05:35pm 26 Oct 2025
Copy link to clipboard 
Print this post

Uff... Albert,

this is impressive! What is the exact name of the matrix? It seems there are quite some out there, which one do you use? Maybe you have a link for me? I would like to buy one.

Greetings
Daniel
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 06:59pm 26 Oct 2025
Copy link to clipboard 
Print this post

Hi Amnesie,

I think it is the cheapest 64x64 pixel-display on Aliexpress(with shipping costs).

P3Matrix64x64


Albert
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 75
Posted: 08:25pm 26 Oct 2025
Copy link to clipboard 
Print this post

@AlbertR, can I ask would this be expandable to work with the P4 256 x 128 Hub75 displays such as this one?

https://www.aliexpress.com/item/1005004353891831.html

I have a couple of them here that I picked up at a recent sale, just not found a use for them yet, but it would be a nice display to make a clock with.

Tony
 
AlbertR
Regular Member

Joined: 29/05/2025
Location: Germany
Posts: 86
Posted: 09:04pm 26 Oct 2025
Copy link to clipboard 
Print this post

Hi Tony,

see this thread, Post 08:14pm 19 Oct 2025.
Yours is like Don's matrix. 64x32 and 16er scan. If 6bit colordepth is enough for you, you can use the prog from the "TwoSmMorph.zip".

Albert
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 75
Posted: 04:05am 27 Oct 2025
Copy link to clipboard 
Print this post

Thanks Albert, i'll give it a go later this week when I get some free time.

Tony
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 75
Posted: 05:37am 27 Oct 2025
Copy link to clipboard 
Print this post

Albert,  I very quickly tried the "TwoSmMorph.zip" code on a RP2350 running the WebMiteRP2350V6.01.00b14.uf2 firmware before I went to work this morning, I had a spare Pico 2W on the desk here and wanted to get the code onto it so I could wire it up when I got home.
Running the code with no display attached, I get an error at line 686 PIO CLEAR 1  Error: PIO 1 not available.

Is the code not suitable for the Pico2W? apologies I have not had time to check the datasheet to see if there are any differences as I have to go to work.

Tony
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 398
Posted: 06:47am 27 Oct 2025
Copy link to clipboard 
Print this post

WEBMITE can only use PIO0 (PIO1 is used for WIFI)

Pluto
 
     Page 2 of 5    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025