|
|
View previous topic :: View next topic |
Author |
Message |
fabio2018
Joined: 07 Sep 2017 Posts: 3
|
Help with PIC18f4550 and Nextion LCD |
Posted: Thu Sep 07, 2017 4:19 pm |
|
|
Good evening!
Has anyone done projects with the CCS compiler and the Nextion lcd ?
Do you need libraries? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Sep 07, 2017 6:50 pm |
|
|
If you want help, post the model number of the Nextion lcd, and post
a link to the webpage where you bought it. |
|
|
fabio2018
Joined: 07 Sep 2017 Posts: 3
|
|
Posted: Fri Sep 08, 2017 4:32 am |
|
|
Model Nextion Enhanced NX8048K070_011C is a powerful 7.0'' HMI TFT capacitive multi-touch display with a beautiful enclosure, with 32MB Flash data storage space, 1024 byte EEPROM, 8192 byte RAM, and GPIO supported.
https://www.itead.cc/nextion-nx8048k070-011r-011c.html |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Fri Sep 08, 2017 5:01 am |
|
|
Sadly that mfr's link doesn't have a 'user manual' or 'datasheet' in it ! Even their Wiki page lacks it unless I missed it.
What does concern me is that while the device requires 5 volts to operate, it's serial interface is THREE volts ! While it appears to me the input is '5 volt tolerent', it can only output( send to PIC) a 3 volt high('1').
It does look nice, without seeing a real user manual, I can't tell how easy it would be to code a PIC to use it. It only requires a simple serial interface (aka HW UART), to hardware is easy...it's 'code crunching' that is unknown.
It does have a LOT of features, especially for <100USD, however it all comes down to programming it.
Jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Sep 08, 2017 9:11 am |
|
|
It's apparently a closed system device. You have to use their "Nextion
Editor", write a program using their special language, and then produce
an .HMI output file, which is then downloaded to the display.
It's not like a serial lcd, where you send it commands from your PIC
via the UART.
They say bluntly:
Quote: |
Nextion is not open source, we do not provide schematic, PCB layout,
IDE source code or design data involved. |
http://support.iteadstudio.com/support/discussions/topics/11000002523
This page lists the commands of their special language, which must be
used with their special Nextion Editor.
https://www.itead.cc/wiki/Nextion_Instruction_Set
I'm not sure, but I think the OP wants to know if we somehow hacked
the Nextion display. I think there are people working on this, but not
for CCS. Google this: Nextion hacked |
|
|
bdeb
Joined: 05 Nov 2010 Posts: 42 Location: Sweden
|
Better late... |
Posted: Wed Jul 28, 2021 3:31 pm |
|
|
Hi gurus,
I normally use small OLED's with the driver from this excellent forum, but the Nextion displays are nice for low volume things that need to look good + debugging.
It's a bit like programming in Visual Studio.
All the "heavy lifting" with nice fonts, graphics, etc are made with the (free) Nextion Editor software. Actual content of text boxes and other variables you place on the screen, is then set via one serial pin. (Defining clicks, etc can also send data back serially.)
1
Make a textbox in Nextion Editor + compile and save to display (by default called first text box called "t0")
2
In PIC define:
#use rs232(BAUD=9600, XMIT=PIN_C7, ERRORS, STREAM=LCD)
(Yes, yes, you may change the default baud rate)
3
From PIC send:
fprintf(LCD,"t0.txt=\"Alive!\"\xFF\xFF\xFF");
Strings to textboxes need to be quoted + all commands ended with 3*0xFF instead of CR/LF
All the best + thanks for all the help I got (so far..)
/Björn |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|