Discussion:
[nuttx] New demo using new features of NX graphics
m_cherciu@yahoo.com [nuttx]
2017-11-01 20:13:28 UTC
Permalink
A demo graphic that displays objects on Nokia 3310 screen using background method and windows method.
Watch the video :
http://youtu.be/YzoLI8AIx54
Patch files are on : http://cmn-lab.com/background-mode-vs-windows-mode http://cmn-lab.com/background-mode-vs-windows-mode
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-01 20:27:07 UTC
Permalink
Hi Mihail,

Great demo! Using window-mode is possible to have advance user interfaces!

Did you try to run the NX Window Manager on this low resolution display?

https://groups.yahoo.com/neo/groups/nuttx/files/NxWM%20Screenshots/

Hmm, you will need to reduce the icons size to something like 8x8
pixel, otherwise the window will not fit in the screen!

It is already impressive how much fun you can get from a simple
display like this!

BR,

Alan
Post by ***@yahoo.com [nuttx]
A demo graphic that displays objects on Nokia 3310 screen using background
method and windows method.
Watch the video : http://youtu.be/YzoLI8AIx54
http://youtu.be/YzoLI8AIx54
Patch files are on : http://cmn-lab.com/background-mode-vs-windows-mode
http://cmn-lab.com/background-mode-vs-windows-mode
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-01 21:58:23 UTC
Permalink
Hi Mihail,

Did you see Greg's comment here:

https://www.linkedin.com/groups/12002792/12002792-6331586387720044548

BR,

Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Mihail,
Great demo! Using window-mode is possible to have advance user interfaces!
Did you try to run the NX Window Manager on this low resolution display?
https://groups.yahoo.com/neo/groups/nuttx/files/NxWM%20Screenshots/
Hmm, you will need to reduce the icons size to something like 8x8
pixel, otherwise the window will not fit in the screen!
It is already impressive how much fun you can get from a simple
display like this!
BR,
Alan
Post by ***@yahoo.com [nuttx]
A demo graphic that displays objects on Nokia 3310 screen using background
method and windows method.
Watch the video : http://youtu.be/YzoLI8AIx54
http://youtu.be/YzoLI8AIx54
Patch files are on : http://cmn-lab.com/background-mode-vs-windows-mode
http://cmn-lab.com/background-mode-vs-windows-mode
m_cherciu@yahoo.com [nuttx]
2017-11-01 22:23:31 UTC
Permalink
Not yet, but I will try to test NX Window Manager. And definitely I must reduce the icons size.
spudarnia@yahoo.com [nuttx]
2017-11-01 22:33:10 UTC
Permalink
There is a configuration option called NXWM_TASKBAR_ICONSCALE that might help you:

config NXWM_TASKBAR_ICONSCALE
bool "Scale Icons"
default n
---help---
Enable scaling of icons in the task bar

if NXWM_TASKBAR_ICONSCALE

config NXWM_TASKBAR_ICONWIDTH
int "Icon Width (pixels)"
default 50
---help---
Scaled width of each taskbar ICON in pixels.

config NXWM_TASKBAR_ICONHEIGHT
int "Icon Height (rows)"
default 42
---help---
Scaled height of each taskbar ICON in pixels.

endif # NXWM_TASKBAR_ICONSCALE
spudarnia@yahoo.com [nuttx]
2017-11-01 22:34:43 UTC
Permalink
Hmmm.. I think I only used this to make Icons bigger for high resolution displays. There might be issues in making them smaller; or maybe not. But I don't think I have ever done that.
spudarnia@yahoo.com [nuttx]
2017-11-01 22:39:57 UTC
Permalink
This post might be inappropriate. Click to display it.
spudarnia@yahoo.com [nuttx]
2017-11-01 22:50:44 UTC
Permalink
Also... you need a touchscreen to use the NxWM example.
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-01 23:16:35 UTC
Permalink
Hi Greg,

Could it work using a USB mouse? For example using the STM32F4Discovery board.

BR,

Alan
Post by ***@yahoo.com [nuttx]
Also... you need a touchscreen to use the NxWM example.
spudarnia@yahoo.com [nuttx]
2017-11-01 23:23:32 UTC
Permalink
With some significant effort it could be made to work with a mouse. NxWM does support a mouse interface, but there are issues:


1. You would need a USB host driver. I don't know if one is available for that MCU
2. The STM32 USB host driver is really bad. No one has been able to make it work nicely with a mouse or with CDC/ACM. It does work okay as a mass storage device because you don't have to poll. Polling is the problem with the STM32 USB host (other MCUs have much better USB host).
3. There is no cursor in NxWM so you would never know where the mouse is positioned. Makes it more or less impossible to use.
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-02 12:39:42 UTC
Permalink
Hi Greg,

Thank you for this explanation.

I didn't know that STM32 USB Host driver was not working correctly.

About the mouse cursor, it could be implemented in software, right?

BR,

Alan
Post by ***@yahoo.com [nuttx]
With some significant effort it could be made to work with a mouse. NxWM
1. You would need a USB host driver. I don't know if one is available for that MCU
2. The STM32 USB host driver is really bad. No one has been able to make
it work nicely with a mouse or with CDC/ACM. It does work okay as a mass
storage device because you don't have to poll. Polling is the problem with
the STM32 USB host (other MCUs have much better USB host).
3. There is no cursor in NxWM so you would never know where the mouse is
positioned. Makes it more or less impossible to use.
spudarnia@yahoo.com [nuttx]
2017-11-02 12:50:19 UTC
Permalink
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
I didn't know that STM32 USB Host driver was not working correctly.
As far as I understand, the problem is not an issue with the USB host driver but with the STM32 USB host hardware. It just does not support polling as does the USB host peripheral on other MCUs.
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
About the mouse cursor, it could be implemented in software, right?
A nice cursor graphic with a transparent background would be very difficult if the hardware does not provide support for it. A cursor is basically a "sprite" and tough to implement well without hardware support: https://en.wikipedia.org/wiki/Sprite_(computer_graphics) https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
You could use NX, I suppose, and create a tiny window that is an opaque cursor and change the cursor position based on mouse input and change the cursor image when a mouse button is pressed.


Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-02 13:41:36 UTC
Permalink
Hi Greg,
Post by ***@yahoo.com [nuttx]
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
I didn't know that STM32 USB Host driver was not working correctly.
As far as I understand, the problem is not an issue with the USB host
driver but with the STM32 USB host hardware. It just does not support
polling as does the USB host peripheral on other MCUs.
Ok understood, does it work fine on SAMV7? I'm planing to move for
some high-end board in the future to create more advanced videos at
youtube channel.
Post by ***@yahoo.com [nuttx]
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
About the mouse cursor, it could be implemented in software, right?
A nice cursor graphic with a transparent background would be very difficult
if the hardware does not provide support for it. A cursor is basically a
https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
You could use NX, I suppose, and create a tiny window that is an opaque
cursor and change the cursor position based on mouse input and change the
cursor image when a mouse button is pressed.
So. only more high-end MCUs like STM32F7, SAMV7, etc should have this
built-in hardware support, correct?

BR,

Alan
spudarnia@yahoo.com [nuttx]
2017-11-02 14:09:27 UTC
Permalink
Ok understood, does it work fine on SAMV7? I'm planing to move for some high-end board in the future to create more advanced videos at youtube channel.
I don't think there is any USB host driver for the samv7 family.
So. only more high-end MCUs like STM32F7, SAMV7, etc should have this built-in hardware support, correct?
The STM32 F429/F769 LTDC does support multiple video planes and I suppose you could dedicate a video plane for a cursor. I don't think that the SAMv7 does, however.


This can be done is somewhere, but would require developing some new logic. A cursor is not so different from a window. The only real difference is that it always has to be at the very top (yet never gets focus) and it has to have support transparencies unless you want it to look like an opaque box.
spudarnia@yahoo.com [nuttx]
2017-11-02 15:12:33 UTC
Permalink
The SAMv7 does not have any built-in LCD controller at all. It does have high performance DMA and is able to support a framebuffer over the memory controller interface to an external LCD controller.


The SAMA5x family does support a nice LCD interface with multiple overlay planes
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-02 15:19:02 UTC
Permalink
Thank you very much Greg for all these infos!
Post by ***@yahoo.com [nuttx]
The SAMv7 does not have any built-in LCD controller at all. It does have
high performance DMA and is able to support a framebuffer over the memory
controller interface to an external LCD controller.
The SAMA5x family does support a nice LCD interface with multiple overlay planes
spudarnia@yahoo.com [nuttx]
2017-11-02 16:25:30 UTC
Permalink
o<<<
11.4.2 Hardware cursor support

The hardware cursor feature reduces software overhead associated with maintaining a cursor image in the LCD frame buffer. Without this feature, software needed to:

• Save an image of the area under the next cursor position.
• Update the area with the cursor image.
• Repair the last cursor position with a previously saved image.

In addition, the LCD driver had to check whether the graphics operation had overwritten the cursor, and correct it. With a cursor size of 64x64 and 24-bit color, each cursor move involved reading and writing approximately 75 kB of data. The hardware cursor removes the requirement for this management by providing a
completely separate image buffer for the cursor, and superimposing the cursor image on the LCD output stream at the current cursor (X,Y) coordinate.

To move the hardware cursor, the software driver supplies a new cursor coordinate. The frame buffer requires no modification. This significantly reduces software overhead.

The cursor image is held in the LCD controller in an internal 256x32-bit buffer memory.
o<<<
You can still get the WaveShare Open1788 boards on eBay.

I don't know if more recent LPCxxxx parts have a similar hardware cursor capability. The NuttX framebuffer and LCD interfaces have methods to controlling a hardware cursor already in place but these would requires some integration to use with a mouse.

Greg
spudarnia@yahoo.com [nuttx]
2017-11-03 01:52:57 UTC
Permalink
The LPC43xx family members that support the LCD peripheral appear to work just the same as the LPC1788. This includes the LPC327x and LPC215x families. Waveshare offers an OpenLPC4357 board with an LCD that would be a great platform for graphics work with a mouse.
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-03 09:18:55 UTC
Permalink
Thank you Greg!

I will take a look on this waveshare board.

BR,

Alan
Post by ***@yahoo.com [nuttx]
The LPC43xx family members that support the LCD peripheral appear to work
just the same as the LPC1788. This includes the LPC327x and LPC215x
families. Waveshare offers an OpenLPC4357 board with an LCD that would be a
great platform for graphics work with a mouse.
spudarnia@yahoo.com [nuttx]
2017-11-03 13:38:43 UTC
Permalink
Another nice thing about the LPC17/43 as a GUI platform is that they also have very good USB host support. The best, in fact. Unlike the crappy "mini-hosts" on the STM32 and SAMv7, they support the industry standard OHCI (lpc17) and EHCI (lpc43) co-processors. That is the gold standard in USB host interfaces.


So I would expect mouse support to be good.


I have always wanted to develop world-class graphics on NuttX and NX and NxWidgets was my first cut. But it still needs some TLC to be even fully usable. I have a pretty long list of things I would like to do to improve the graphics capability.


If there are other who might be interested in top-notch graphics, it would be a fun project and I would be happy to work with anyone who wants to participate.


Greg

m_cherciu@yahoo.com [nuttx]
2017-11-02 05:31:39 UTC
Permalink
Hi Alan,

I have others displays with higher resolution, I can test them. But I started with the Nokia 3310 display just for fun an for understand better the NuttX system.


Thank you for all informations,
Mihail
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-11-02 12:40:57 UTC
Permalink
Hi Mihail,

Yes, I think using a higher resolution LCD with touchscreen could be
more interesting to show more advanced features.

BR,

Alan
Post by ***@yahoo.com [nuttx]
Hi Alan,
I have others displays with higher resolution, I can test them. But I
started with the Nokia 3310 display just for fun an for understand better
the NuttX system.
Thank you for all informations,
Mihail
spudarnia@yahoo.com [nuttx]
2017-11-02 12:52:45 UTC
Permalink
A higher resolution display is better connected via FSMC. The FSMC interface performs well (and you can set up DMA). SPI interfaces get noticeably slower when the resolution and pixel depth increase.
Loading...