32x64 LED monitor

Forum for discussion of electronic television. Generally, stuff to do with CRTs and not using mechanical displays.

Re: 32x64 LED monitor

Postby Steve Anderson » Sat Sep 15, 2018 9:17 pm

I forgot this earlier...allowed file extensions for attachments....others can be added, just ask...e.g. asm.

Steve A.

gif
jpeg
jpg
png
tga
tif
torrent

ace
bas
bmp
dxf
gtar
gz
hex
mov
rar
tar
zip

c
cpp
diz
h
hpp
txt

ai
avi
doc
docx
dot
dwg
m4v
mp3
mp4
mpeg
mpg
pdf
ppt
ps
scad
stl
wav
wmv
xls

rm

wma

flv
swf
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: 32x64 LED monitor

Postby nanowaver » Sat Sep 29, 2018 5:47 am

I ordered one of these 64 x 32 pixel P3 displays and it came in 6 days!
https://www.ebay.co.uk/itm/P3-RGB-pixel ... 2749.l2649

I hooked the panel up using an Arduino Mega2560 and the connection data in the Adafruit notes and it worked straight-away using the RGBmatrixpanel library.
I believe there is a corresponding library for the Teensy which has been written by PJRC. Does anyone have experience of this with the Teensy 3.2 or 3.6?

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby dominicbeesley » Sun Sep 30, 2018 1:50 am

They do work and the libraries are what I started with, the code I posted is for a teensy I think...

The problem is that the Adafruit/Arduino library code is relatively slow and not optimised for the kind of pixel shuffling you need for NBTV which was why I ended up writing my own interrupt driven drivers. For an NBTV signal of 32x48 pixels at 12.5 frames a second you're looking at colour 19200 pixels a second. But those displays are effectively PWM so for a simplistic 8 bit depth approach you'll effectively be doing more like 5 million mono pixels a second! With the planar approach I got this down to effectively 200,000 bits per second. I can't remember exactly how the Adafruit libraries did it, but I remember it wasn't fast enough to keep up.

Also, getting the ADC working at the 20kS/s or so needed requires low-level tinkering and DMA (i.e. it records direct to a buffer rather than you sitting in a loop asking for data otherwise there's not enough time to do anything with the data that you get!)

Getting the NBSC colour decoding working required using the special signal processing libraries to use the built in features of the chip but if you went for one of the simpler to decode (Klaas/Gary?) colour formats you might find life easier. For B/W it's fairly easy to get a simple decoder working though more work is required to get a decent lock to noisy/degraded signals...

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: 32x64 LED monitor

Postby dominicbeesley » Sun Sep 30, 2018 1:52 am

One option that I didn't investigate was to use two teensy's, one to do the ADC/decoding that then spits data across a bus (SPI?) to the other that does the display. That would make for a simpler set up...

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: 32x64 LED monitor

Postby nanowaver » Sun Sep 30, 2018 6:55 am

Many thanks for the comments.
What pin connections are you using between the display and the Teensy?

Attached is my latest simple offering. It seems to work quite well with the Teensy clocking at 120MHz and a picture zoom factor of 5. For displaying just a static test card, my false colour option (i.e. 8 colours representing the different brightness levels) looks quite nice on either an OLED or TFT display.

Baz
Attachments
NBTV_monitor_GW3JGA_analog_in_software_12_ILI9341TFT.zip
(2.23 KiB) Downloaded 649 times
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby nanowaver » Sat Oct 13, 2018 9:44 pm

I now have a smartLED shield v4 running with a Teensy 3.2 and 32 x 64 pixel LED panel using the SmartMatrix3 and FastLED libraries.
The demo code looks very impressive but the hard part (NBTV display) is yet to come.

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby nanowaver » Thu Oct 18, 2018 12:37 am

Attached is the latest software for my simple LED NBTV monitor and a few photos of the display. The photos do not do justice to the display as seen by the eye. The display can also show 8 level blue or grey or 16 level red, green, blue or grey.

If there's any interest, I'll post the circuit schematic - at present it's a bit rough, so I'll have to redraw it to make it presentable.

I've also tested the monitor using the freenbtvgen software and it seems to work OK but the software delay in my linescan routine could do with a little tweeking to comply exactly with the NBTVA standard. Hence the next TO DO is some buttons to increase/decrease the delay in linescan using a delaynanoseconds() routine as posted elsewhere on the WWW.

Baz
Attachments
IMG_2632.JPG
General view of the electronics
IMG_2632.JPG (73.28 KiB) Viewed 15027 times
IMG_2634.JPG
testcard in 8 level red
IMG_2634.JPG (52.91 KiB) Viewed 15027 times
IMG_2637.JPG
test card in 8 level false colour
IMG_2637.JPG (54.34 KiB) Viewed 15027 times
NBTV_monitor_GW3JGA_analog_in_software_15_ILI9341TFT.zip
(3.21 KiB) Downloaded 660 times
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby dominicbeesley » Thu Oct 18, 2018 2:41 am

Interesting, I got a little colour OLED display recently with the intention (one day) of doing something similar.

What NBTV standard are you using for colour?

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: 32x64 LED monitor

Postby nanowaver » Thu Oct 18, 2018 3:42 am

Dom

being a newbie at NBTV, I just looked in the NBTV Handbook at the RGB colour bar generator described on page 39. There it lists a (SMPTE?) colour bar as black,blue,red,magenta,green,cyan, yellow and white and so I just assigned one brightness level to each one. The colour combinations are then

Level Colour R G B
------- ------ ------
0 black 0 0 0 0 means no contribution, 1 means maximum contribution
1 blue 0 0 1
2 red 1 0 0
3 magenta 1 0 1
4 green 0 1 0
5 cyan 0 1 1
6 yellow 1 1 0
7 white 1 1 1

In practice the ILI9341 library uses RGB565 colour, hence the hex values in the software.

Hope this helps?

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby Steve Anderson » Thu Oct 18, 2018 1:26 pm

Interesting...are these displays limited to just the six colours plus black & white? Or can they be modulated in some manner? (PWM perhaps?). Some of the examples on e-bay show a complete colour range.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: 32x64 LED monitor

Postby nanowaver » Thu Oct 18, 2018 6:17 pm

Steve

the fast ILI9341 library uses 16 bit colour in the the RGB565 colour format, i.e. 5 bits for red, 6 bits for green and 5 bits for blue so that gives you a very large range of colours and brightness levels. These colours obviously include black, greys and white.
A good on-line colour picker for RGB565 can be found at
http://www.barth-dev.de/online/rgb565-color-picker/
Just pick the colour you want and the software tells you the required hex value.

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby nanowaver » Thu Oct 18, 2018 7:47 pm

Steve
to follow on from my last post.
The ILI9341 controller chip contains a RAM large enough to hold info about each pixel in the display. So in the Arduino sketch you can just write to a pixel by giving its x and y coords and the hex value which represents the RGB565 colour for that pixel. That info is retained as long as power is supplied to the display and does not need to be refreshed until you want to change the colour for that pixel. I assume the RGB565 data is then just used to set the current for the three LEDs (RGB) associated with each pixel so no PWM etc?
Writing to individual pixels is relatively slow but plenty fast enough for NBTV. My Teensy 3.6 is being clocked at 120MHz but about 500usec of that is "idle time" during the time it takes to display one NBTV line (i.e. about 2500usec). Much of the remaining time (2500 - 500usec) is taken up in reading the adc (to get the next video voltage level) and drawing pixels since my picture is enlarged (i.e. one pixel from the NBTV frame is actually represented on the display by 5 x 5 identical pixels). If picture zooming is not required, an Arduino Due at 84MHz can easily display the now much smaller picture since only 32 x 48 as compared to 25 x 32 x 48 pixels need to be drawn for each frame.
I actually draw the 5 x 5 pixels as 5 lines, each of which is 5 pixels long, but it is probably faster to use the draw_Rectangle command to just draw a 5 x 5 square as the library will be more optimised.

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby Klaas Robers » Mon Oct 22, 2018 6:13 pm

If you display and write pixels in 5 x 5 blocks, I would prefer to split each pixel up in 5 sub-pixels of 5 x 1 and write an NBTV-line not in 48 pixles, but in 240 sub-pixels. Then you have no pixelation in the line direction, but a near analog line. You will see that makes the displayed picture much better. This compares better to the display of a Nipkow disc, where also in the line direction there is no pixelation.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: 32x64 LED monitor

Postby nanowaver » Tue Oct 23, 2018 5:39 am

Klass
I think that is what I am doing at present - representing each NBTV picture line as made up of 48 vertical lines, each of which is 5 display pixels long. Each picture line is then duplicated an extra 4 times to give the total of 25 display pixels representing 1 picture pixel.

Now a question for Dom.
I'm trying to get my 64 x 32 LED matrix panel (with Teensy 3.6 and Smart Matrix shield v4) to display a Grant Dixon test card but am getting puzzling results. The SmartMatrix library has a demo program which includes the following setup parameters

#define COLOR_DEPTH 24 // known working: 24, 48 - If the sketch uses type `rgb24` directly, COLOR_DEPTH must be 24
const uint8_t kMatrixWidth = 32; // known working: 32, 64, 96, 128
const uint8_t kMatrixHeight = 32; // known working: 16, 32, 48, 64
const uint8_t kRefreshDepth = 36; // known working: 24, 36, 48
const uint8_t kDmaBufferRows = 4; // known working: 2-4, use 2 to save memory, more to keep from dropping frames and automatically lowering refresh rate
const uint8_t kPanelType = SMARTMATRIX_HUB75_32ROW_MOD16SCAN; // use SMARTMATRIX_HUB75_16ROW_MOD8SCAN for common 16x32 panels
const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_NONE); // see http://docs.pixelmatix.com/SmartMatrix for options
const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
const uint8_t kScrollingLayerOptions = (SM_SCROLLING_OPTIONS_NONE);
const uint8_t kIndexedLayerOptions = (SM_INDEXED_OPTIONS_NONE);

Obviously I need to set MatrixWidth to 64 and MatrixHeight to 32 and to specify 32 rows in the PanelType command.
I would guess that I only need the background layer but not the scrolling and index layers?

What values do I need for RefreshDepth and DmaBufferRows?

Can I write picture data for a whole NBTV frame into the buffer "on the fly" as I read the ADC for each pixel brightness and then use swapbuffers at the end of the frame to display the actual frame?

Baz
nanowaver
"Fester, enough of the light-bulbs!"
 
Posts: 16
Joined: Sat Sep 29, 2018 5:37 am
Location: Sheffield, UK

Re: 32x64 LED monitor

Postby Klaas Robers » Tue Oct 23, 2018 6:20 pm

But the question is: can you also sample the NBTV line 5x faster and display it as a line of 5x48 display pixels? Then you still may copy it as 5 lines next to each other. Then the sampling of the line is made invisible, due to the 5x oversampling. That will give you a well visible better picture.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

PreviousNext

Return to Electronic NBTV

Who is online

Users browsing this forum: No registered users and 2 guests