CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Help with PIC18f4550 and Nextion LCD

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
fabio2018



Joined: 07 Sep 2017
Posts: 3

View user's profile Send private message

Help with PIC18f4550 and Nextion LCD
PostPosted: Thu Sep 07, 2017 4:19 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Sep 07, 2017 6:50 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Sep 08, 2017 4:32 am     Reply with quote

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: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Sep 08, 2017 5:01 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Sep 08, 2017 9:11 am     Reply with quote

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: 36
Location: Sweden

View user's profile Send private message Visit poster's website

Better late...
PostPosted: Wed Jul 28, 2021 3:31 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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