I'm learning the ide from web example use. If I make the effort to figure it out the nextion could be a cool display.
Thanks for making nextion driver.
I notice that ili displays have an sd card but it's not supported in gcb.
I suppose it holds images so could make it look like nextion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I bet Nick aka macgman2000 is finding the 7 inch nextion more than he bargained for.
The ide seems universally difficult to learn...but with effort ? so many commands.
The nextion has a much more powerful processor than a 328p.
It works with gcb glcd but can do lots more so spending time learning nextion.
It was discussed years ago on the forum and I got nowhere but more info now.
As with most gcb things I can not find a permanent use for a nextion unlike Nick
who has plan and seeks a solution for his radio project.
Thanks again Anobium for nextion and all glcd gcb support.
gcb would not be so good if we had to write all the devices it supports ourselves....
most of us couldn't.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anobium. An ili9481 same as in Macgman2000 originally used arrived today.
It just plugs into a uno and uses all it's ports.
I tried the mega328p simple glcd demo which worked but the screen is reversed.
When the demo starts it prints glcd print in 2 sizes ok then reversed numbers then the final screen.
Please can you explain this? Would it be pins connections don't match code definitions?
cheers.
What is reversed? turn the GLCD around. Does this resolve it? Or, look from the other side of the table.
A picture may help.
I can already explain. Every GLCD may look the same, they may even have the same controller, they are however different. Each clone maker clone the controller, connect differerent etc etc.
Last edit: Anobium 2020-09-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Everything is a mirror image..see photo above. All wiring matches gcb demo.
I tried this code and only got text in same position for landscape and landscape_rev but looks ok.
portrait and portrait_rev both give mirror image text in same position.
and as the glcd demo loops in portrait it is a mirror image.
doGLCDRotate(Landscape_rev)' optionally you can rotate the screen.GLCDCLSGLCDPrint(2, 12, "GLCDPrint String")wait3sGLCDRotate(PORTRAIT_REV)GLCDCLSGLCDPrint(2, 12, "GLCDPrint String")wait3sGLCDRotate(Landscape)GLCDCLSGLCDPrint(2, 12, "GLCDPrint String")wait3sGLCDRotate(Portrait)GLCDCLSGLCDPrint(2, 12, "GLCDPrint String")wait3sloop
The phyical connections on the GLCD are wrong. Send it back. Or, the geometry in the library is correct. So, the LCD is fitted incorrectly, or, the controller is not correct.
So, this is not 'mirror image' this is a rotation error?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have had a scan of the datasheet. There is control for the direction of display update. This is called called MADCTL typically register 0x36, page 78 of the datasheet.
The photos are the code I posted above showing screen rotation effect.
The problem is rotation...on this mcufriend diplay.
landscape and landscape_rev print text and graphics ok but the screen does not rotate.
portrait and portrait_rev mirror the display and don't rotate the screen.
I downloaded a 312 page pdf ili9846 data sheet and can't find MADCTL.
I don't know what "so ,in the init we use" etc.
this is the init in the demo
#defineGLCD_TYPEGLCD_TYPE_ILI9481'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
#defineGLCD_RDANALOG_0' read command line
#defineGLCD_WRANALOG_1' write command line
#defineGLCD_RSANALOG_2' Command/Data line
#defineGLCD_CSANALOG_3' Chip select line
#defineGLCD_RSTANALOG_4' Reset line
#defineGLCD_DB0DIGITAL_8
#defineGLCD_DB1DIGITAL_9
#defineGLCD_DB2DIGITAL_2
#defineGLCD_DB3DIGITAL_3
#defineGLCD_DB4DIGITAL_4
#defineGLCD_DB5DIGITAL_5
#defineGLCD_DB6DIGITAL_6
#defineGLCD_DB7DIGITAL_7
#definedeviceSpecific_ILI9481_GLCD_HEIGHT476
If I change the simple glcd to landscape it works but is designed for portrait
and like lots of gcb glcd, it does not show an error if like in the photo stuff is off screen.
Anobium. Looking back over this thread I saw you refer to
..GreatCowBasic\demos\glcd_solutions\glcd_simple_demonstration_solutions\glcd_simple_demonstation_unoshield_mega328p_for_ili9486@16.gcb (7)
I tried it and it works! shock horror!
so what's the difference in the simple glcd demos except uno shield?
#defineUNO_8bit_Shield
This has been a waste of your time. I'm sorry....but a simple explanation please.
there's
This is the display I am using,came with a touch stylus pen.
I can not see a way of using touch with gcb demos and the display pins.
dunno if you can see the pin labels.
it is a nice display. getting touch to work would make it nicer...
as the thread creator said, it's not a simple demo for this display.
I would rather try to get an ili touch to work than a nextion.
looking at the photo of the board above post, I find nothing out of the touch types that is compatable with this display using gcb.
The calculator is not compatable nor the glcd touch demos.
It isn't supported so macgman2000 gave up.
Last edit: stan cartwright 2020-09-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another question.I found a mega2560 board. If I wired this dispay to it
using the mega 328 and define uno shield would it work?
it doesn't match mega2560 pinout so is it worth wiring ie with wires?
if I wire it pin for pin with 2560 would uno code work?
I'm not going to try tonight.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know how many people have used this display with gcb but...
GLCDRotate Landscape_Rev
Box (0,0,479,319,TFT_YELLOW) and only 3 sides of box...no top
needs Box (0,1,479,319,TFT_YELLOW) to get a box.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As this post was originally recomended glcd for gcb..again what is?
I tried a ssd1306...great but same size as a stamp and monochrome.
Then a colour version but mine had a permanent white line and not sending back to China.
Then ili9346. Fast display and not many wires but 3.3V logic so hassle.
also touch never worked on 3 devices.
Then nextion which work with gcb but using gcb glcd are very slow
and using the ide is like learning a graphics app. but only 2 wires.
I recently tried a ili9486 which needs more ports than you can wave a stick at
ie it fits a uno but uses all a-d ports...but it's a fast display.
again I can't sort touch screen to work.
So what colour display works with gcb touch at 5V logic? spi,i2c preferred.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#defineXPT2046_DIDIGITAL_12' Data in | MISO #define XPT2046_DO DIGITAL_11 'Dataout|MOSI#defineXPT2046_SCKDIGITAL_13' Clock Line #define XPT2046_CS DIGITAL_2 'Chipselectline#defineXPT2046_IRQANALOG_5#defineXPT2046_HardwareSPI
demo but all I get using a 328p nano is touch the screen and red square flashes and led on the nano flashes but no screen info.
the logic to the diplay is dropped to 3.3V.
the above shared
#defineXPT2046_DIDIGITAL_12' Data in | MISO #define XPT2046_DO DIGITAL_11 'Dataout|MOSI#defineXPT2046_SCKDIGITAL_13'ClockLine
are joined after the leveller ie 3.3V logic and XPT2046_CS DIGITAL_2 is sent through
the leveller so at 3.3Vlogic.
the XPT2046_IRQ ANALOG_5 is wired strait to an5 but tried it through the level converter.
Tried 3 Ili9341 but no touch.
I have had a look at the ILI9486 GLCD with respect to support.
At with all things there ILI9486 GLCDs and there are ILI9486 GLCDs.
There is a specfiic ILI9486 GLCD for the Raspberry. This device comes a XPT Touch sensor. This works as expected with teh XPT library. And, there are demos for this.
There a lot more ILI9486 GLCDs with resistive Touch interface. This is a mess of touch solution and these The ILI9486 GLCDs can be spotted by the lack of the XPT chip on the bottom.
See later in this post.
But, beware even if the advert says 'Touch' .. you need to ensure the ILI9486 GLCD comes with the XPT chip.
Here is a start but this does work completely - I will leave this to someone who has a need to resolve.
The code sets up the GLCD, and then toggles port power across the resistive Touch interface then you read. then you need to toggles port power and read again etc.
This is a prototype based on the URL above. It shows some values on the terminal.
'Chip Settings.
#chipmega328p, 16
#optionexplicit
#include<glcd.h>
#include<uno_mega328p.h>
#defineGLCD_TYPEGLCD_TYPE_ILI9486
#defineUNO_8bit_Shield'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
#defineGLCD_RDANALOG_0' read command line
#defineGLCD_WRANALOG_1' write command line
#defineGLCD_DCANALOG_2' Command/Data line.
#defineGLCD_CSANALOG_3' Chip select line
#defineGLCD_RSTANALOG_4' Reset line
#defineGLCD_DB0DIGITAL_8
#defineGLCD_DB1DIGITAL_9
#defineGLCD_DB2DIGITAL_2
#defineGLCD_DB3DIGITAL_3
#defineGLCD_DB4DIGITAL_4
#defineGLCD_DB5DIGITAL_5
#defineGLCD_DB6DIGITAL_6
#defineGLCD_DB7DIGITAL_7
#Define_xpDIGITAL_7
#Define_ymDIGITAL_6
#Define_xmANALOG_2
#defineADPORT_xmAN2
#Define_ypANALOG_1
#defineADPORT_ypAN1GLCDBackground=ILI9486L_BLUEGLCDCLSGLCDPrint0,0, "Touch"
#defineAD_Delay2010usDoDir_ypinDir_ymindir_xpout: _xp=1Dir_xmout: _xm=0HSerPrintReadAD10(1)HSerSend9dir_xpinDir_xminDir_ypout: _yp=1Dir_ymout: _ym=0HSerPrintReadAD10(2)HSerSend9HSerPrintCRLFwait100msLoop
Enjoy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you need the 'vis' object in the Nextion screen. So, that needs to be there via the Nextion IDE.
I'm learning the ide from web example use. If I make the effort to figure it out the nextion could be a cool display.
Thanks for making nextion driver.
I notice that ili displays have an sd card but it's not supported in gcb.
I suppose it holds images so could make it look like nextion.
I bet Nick aka macgman2000 is finding the 7 inch nextion more than he bargained for.
The ide seems universally difficult to learn...but with effort ? so many commands.
The nextion has a much more powerful processor than a 328p.
It works with gcb glcd but can do lots more so spending time learning nextion.
It was discussed years ago on the forum and I got nowhere but more info now.
As with most gcb things I can not find a permanent use for a nextion unlike Nick
who has plan and seeks a solution for his radio project.
Thanks again Anobium for nextion and all glcd gcb support.
gcb would not be so good if we had to write all the devices it supports ourselves....
most of us couldn't.
Anobium. An ili9481 same as in Macgman2000 originally used arrived today.
It just plugs into a uno and uses all it's ports.
I tried the mega328p simple glcd demo which worked but the screen is reversed.
When the demo starts it prints glcd print in 2 sizes ok then reversed numbers then the final screen.
Please can you explain this? Would it be pins connections don't match code definitions?
cheers.
Last edit: stan cartwright 2020-09-21
What is reversed? turn the GLCD around. Does this resolve it? Or, look from the other side of the table.
A picture may help.
I can already explain. Every GLCD may look the same, they may even have the same controller, they are however different. Each clone maker clone the controller, connect differerent etc etc.
Last edit: Anobium 2020-09-21
Everything is a mirror image..see photo above. All wiring matches gcb demo.
I tried this code and only got text in same position for landscape and landscape_rev but looks ok.
portrait and portrait_rev both give mirror image text in same position.
and as the glcd demo loops in portrait it is a mirror image.
Last edit: stan cartwright 2020-09-21
this is the include orientation code
Last edit: stan cartwright 2020-09-21
No Stan.
Do not be changing the library.
The phyical connections on the GLCD are wrong. Send it back. Or, the geometry in the library is correct. So, the LCD is fitted incorrectly, or, the controller is not correct.
So, this is not 'mirror image' this is a rotation error?
Hold on.... the photos.
Is one the existing working one?
And, the other is the new one?
Have had a scan of the datasheet. There is control for the direction of display update. This is called called MADCTL typically register 0x36, page 78 of the datasheet.
So, in the init we use
In you main code, try changing the high nibble.
Bits 5, 6 and 7 control the update direction.
See page 79 of the datasheet. The Great Cow BASIC default is 000.
So, work through the seven options using ONLY one at a time like 0x1E then 0x2E
Last edit: Anobium 2020-09-21
The photos are the code I posted above showing screen rotation effect.
The problem is rotation...on this mcufriend diplay.
landscape and landscape_rev print text and graphics ok but the screen does not rotate.
portrait and portrait_rev mirror the display and don't rotate the screen.
Mirroring using this display is a popular subject on arduino sites when I searched.
https://www.google.com/search?client=opera&q=ili9486+mirror+image&sourceid=opera&ie=UTF-8&oe=UTF-8
Stan please see https://sourceforge.net/p/gcbasic/discussion/579125/thread/3dc86155d5/#c272 above
I downloaded a 312 page pdf ili9846 data sheet and can't find MADCTL.
I don't know what "so ,in the init we use" etc.
this is the init in the demo
If I change the simple glcd to landscape it works but is designed for portrait
and like lots of gcb glcd, it does not show an error if like in the photo stuff is off screen.
please simply read https://sourceforge.net/p/gcbasic/discussion/579125/thread/3dc86155d5/?page=2&limit=25#c272
and the two lines, and test the 8 values.
Last edit: Anobium 2020-09-21
Anobium. Looking back over this thread I saw you refer to
..GreatCowBasic\demos\glcd_solutions\glcd_simple_demonstration_solutions\glcd_simple_demonstation_unoshield_mega328p_for_ili9486@16.gcb (7)
I tried it and it works! shock horror!
so what's the difference in the simple glcd demos except uno shield?
This has been a waste of your time. I'm sorry....but a simple explanation please.
there's
which is not in the demo I used.
Now to get touch working.
cheers
edit ps this is a fast display!
Last edit: stan cartwright 2020-09-21
This is the display I am using,came with a touch stylus pen.
I can not see a way of using touch with gcb demos and the display pins.
dunno if you can see the pin labels.
it is a nice display. getting touch to work would make it nicer...
as the thread creator said, it's not a simple demo for this display.
I would rather try to get an ili touch to work than a nextion.
Try the calculator demos. It has touch.
looking at the photo of the board above post, I find nothing out of the touch types that is compatable with this display using gcb.
The calculator is not compatable nor the glcd touch demos.
It isn't supported so macgman2000 gave up.
Last edit: stan cartwright 2020-09-22
Another question.I found a mega2560 board. If I wired this dispay to it
using the mega 328 and define uno shield would it work?
it doesn't match mega2560 pinout so is it worth wiring ie with wires?
if I wire it pin for pin with 2560 would uno code work?
I'm not going to try tonight.
I don't know how many people have used this display with gcb but...
GLCDRotate Landscape_Rev
Box (0,0,479,319,TFT_YELLOW) and only 3 sides of box...no top
needs Box (0,1,479,319,TFT_YELLOW) to get a box.
Send me an email. Looks like we need to tweak the library.
nextion displays..what does the image mean?..from gcb/nextion google
how to get x,y touched from whole screen as default.
As this post was originally recomended glcd for gcb..again what is?
I tried a ssd1306...great but same size as a stamp and monochrome.
Then a colour version but mine had a permanent white line and not sending back to China.
Then ili9346. Fast display and not many wires but 3.3V logic so hassle.
also touch never worked on 3 devices.
Then nextion which work with gcb but using gcb glcd are very slow
and using the ide is like learning a graphics app. but only 2 wires.
I recently tried a ili9486 which needs more ports than you can wave a stick at
ie it fits a uno but uses all a-d ports...but it's a fast display.
again I can't sort touch screen to work.
So what colour display works with gcb touch at 5V logic? spi,i2c preferred.
There's a ADS7843 touch demo and
demo but all I get using a 328p nano is touch the screen and red square flashes and led on the nano flashes but no screen info.
the logic to the diplay is dropped to 3.3V.
the above shared
are joined after the leveller ie 3.3V logic and XPT2046_CS DIGITAL_2 is sent through
the leveller so at 3.3Vlogic.
the XPT2046_IRQ ANALOG_5 is wired strait to an5 but tried it through the level converter.
Tried 3 Ili9341 but no touch.
I have had a look at the ILI9486 GLCD with respect to support.
At with all things there ILI9486 GLCDs and there are ILI9486 GLCDs.
There is a specfiic ILI9486 GLCD for the Raspberry. This device comes a XPT Touch sensor. This works as expected with teh XPT library. And, there are demos for this.
There a lot more ILI9486 GLCDs with resistive Touch interface. This is a mess of touch solution and these The ILI9486 GLCDs can be spotted by the lack of the XPT chip on the bottom.
See later in this post.
But, beware even if the advert says 'Touch' .. you need to ensure the ILI9486 GLCD comes with the XPT chip.
So, how to make the resistive Touch interface. Port this library
https://github.com/adafruit/Adafruit_TouchScreen/blob/master/TouchScreen.cpp
Here is a start but this does work completely - I will leave this to someone who has a need to resolve.
The code sets up the GLCD, and then toggles port power across the resistive Touch interface then you read. then you need to toggles port power and read again etc.
This is a prototype based on the URL above. It shows some values on the terminal.
Enjoy