Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old June 6th 18, 08:03 PM posted to rec.radio.amateur.moderated,rec.radio.amateur.homebrew
external usenet poster
 
First recorded activity by RadioBanter: Mar 2018
Posts: 25
Default [KD8CEC] How to use Nextion LCD #1 - Start Nextion LCD


KD8CEC Amateur Radio

///////////////////////////////////////////
How to use Nextion LCD #1 - Start Nextion LCD

Posted: 06 Jun 2018 08:26 AM PDT
http://www.hamskey.com/2018/06/how-t...t-nextion.html

How to use Nextion LCD #1 - Start Nextion LCD
I do not know much about Nextion LCD. During the production of uBITX
Firmware which is HF Transceiver, I was introduced by several OMs, The
ultimate goal of this article is to create a GUI for the HF Transceiver.

uBITX CEC Version officially supports Nextion LCD from version 1.09.
We will support 2.4 "and 2.8" LCD by default. You do not need to understand
everything below to connect uBITX Nextion LCD. Just use the Nextion Editor
to load the firmware on the Nextion LCD. If you want to create your own
GUI, please read these articles.

How to use Nextion LCD Series#1 Start Nextion LCD#2 Programming and
application#3 - Practice for use with a transceiver#4 Applied to HF
Transceiver#5 Advanced Application (Applied to various sizes))
1.Nextion LCD?
- I have not used the Nextion LCD for several days, This article was
written by me as I learned Nextion LCD.
- It is a TFT LCD with built-in Font, Control etc. required for GUI
This is why you can use the graphical GUI on small size MCUs like Arduino.



- It performs serial (UART) communication with MCU.
No extra circuitry is required to use the LCD.
Nextion LCD can handle 5+ TTL signals, so you can connect directly to
Arduino.
A GUI interface is possible if you know you are only using Uart.

-Currently, 15 kinds of Nextion LCD are sold.
- For more information, please Nextion LCD homepage.
https://nextion.itead.cc/

2.What you need to use Nextion LCD
- Nextion Editor Software
- Nextion LCD (option - Ironically, but really, Nextion LCD Editor is
great. You can understand it in my next post.)
- USB to Serial converter ($1 ~ $2) - If you have a very convenient to use.


3.Purchase
- I did not know Nextion LCD some time ago. So I made a purchase by
searching on ebay or aliexpress. And I had to wait more than two weeks.


- However, knowing Nextion LCD was famous, so we sold most of them at
internet shopping mall selling electronic parts.

- I recently purchased the 2.8 "Nextion LCD again and was able to purchase
it for $ 12 each.

4.Install Software for Nextion LCD
Nextion LCD Software is excellent. It has a built-in LCD emulator so that
it can be tested without Nextion LCD.
Even if you have Uart to Serial, you can also display the signal sent from
the MCU in the Emulator.

-https://nextion.itead.cc/resources/download/


-click to download.exe and execute nextion-setup-v05xxx.exe





5.First Use - Create Project
-Execute NextionEditor


- File - New - Enter the directory and name you want and press OK.


- Select the type of LCD you want to program.
Since I use the NX3224T024, which is a $ 12 LCD, I chose the following.

click 'Basic' - Click 'NX3224T024_011'



- Select Display direction - (Important, I could not find this and suffered
a few hours.)


- Select Character Encoding set
If you are using a language other than English, select the appropriate
character set for your language. If you want to display only English on the
LCD, select ASCII.



- Generated project


6.Font Generator
In order to output characters on the LCD, a font must be created.
You can embed the font you want on the Nextion LCD.

Tools - Font Generator Click



Select Height (32)
Select Code (Ascii)
Input Font Name (msgothic_32)
Click the Generate font


Input File Name (msgothic_32) - OK


OK


OK (The generated font is automatically added to your project)


Close the font generator window.

Look at the bottom left of the Nextion Editor
You will probably see a Picture window like the one below.

Click the Font Tab.


You can see the font you added.



7.Printing text on the screen
- Output Hello World on the LCD screen

In the left Toolbox, click 'Text'


'Newtxt' appears on the LCD design screen.
This is called text control.
This text control is named 't0'.


If you scroll down the Attribute window on the right side, it will be
displayed as below.

Change the value of txt_maxl from 10 to 20.
(t0 The length of the character that the control can display at maximum)


You can now enter up to 20 characters in 'txt'
In 'txt', enter Hello World.


Move the t0 control to the center of the screen with the mouse


Click the 'Debug' button


Congratulations. You have successfully programmed the LCD screen.
Now you have completed a complete GUI.
Now when you send data to the Uart in the GUI you created, it will be
displayed on the screen.


Nextion LCD provides a complete debugging environment.
Instead of programming to the MCU, we will pass signals directly.

At the bottom, you will see the following window.
Type 't0.txt="Hello OM"' and Enter.


The LCD will change as shown below.


8.Upload a GUI program to the LCD
- Connect 'USB to Serial' to your computer.
Check your USB To Serial port on the control panel.



Connect USB to Serial to Nextion LCD.


Black : GND
Red : +5V
Yellow : MCU(TX) - Nextion LCD (RX)
Blue : MCU(RX) - Nextion LCD (TX)

- Click the 'Upload' button in the Nextion Editor.


The following window will appear.


Select Comport, Speed does not change (115200)
(Important : Nextion LCD uses 115200 for firmware upload and 9600 for data
transmission and reception)


click the 'Go' Button


The upload progress rate is shown below.


When uploading, Nextion LCD is displayed as below.





When the upload is completed, it will be displayed as below.


When the upload is complete, the program you created appears on the LCD.


-You will now output Nextion LCD if you connect Nextion LCD to the MCU and
transfer data from the MCU.

example)
Serial.print("t0.txt=Hello OM");
Serial.write(0xFF);
Serial.write(0xFF);
Serial.write(0xFF);

The Nextion LCD protocol is simple. You only need to add three 0xFF at the
end.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[KD8CEC] How to use Nextion LCD #1 - Start Nextion LCD KD8CEC via rec.radio.amateur.moderated Admin Homebrew 0 June 6th 18 08:03 PM
[KD8CEC] Old Photo#2 - Cortex M0 - Hand Packaging KD8CEC via rec.radio.amateur.moderated Admin Moderated 0 June 3rd 18 08:34 PM
[KD8CEC] Introducing uBITX's Invalid Calibration Symptoms and Recovery Mode KD8CEC via rec.radio.amateur.moderated Admin Moderated 0 May 11th 18 08:25 PM
[KD8CEC] How to connect SDR (RTL-SDR) to uBITX and uBITX Firmware CEC Version V1.071 (Beta) Release KD8CEC via rec.radio.amateur.moderated Admin Homebrew 0 April 13th 18 08:00 PM
Where to start? Thedarklord General 1 April 28th 11 12:57 PM


All times are GMT +1. The time now is 12:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017