Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - NEXTION TOUCH

(you are viewing a thread; or go back to list of threads)

NEXTION TOUCH (by Ihor Nehrutsa)
Has anyone tried to connect Nextion touch screen to the LDmicro?
Is there a practical result and experience?

https://www.itead.cc/nextion-nx3224t024.html
Wed Aug 22 2018, 07:52:45
(no subject) (by Tom J.)
I have sent uart to a PIC from one.
Nextion sends three 4-character codes to signify the end of a transmission.
I wrote a ladder to try to isolate and filter them but can't tell what's happening, theres formatting somewhere and my LCD displays a different value than the Nextion is sending.

I'm going to try to send the UART right back to the Nextion and display it there to look for clues.

I have with great success used the Nextion GPIOs to send binary 16 bit and display the numeric value on 7-segment with PIC. Theoretically I could use the other four lines to send binary back to the Nextion.
Sat Feb 2 2019, 11:18:26
(no subject) (by Tom J.)
Ihor, I've had limited success with serial, my test is a PIC16F886 and a serial enabled LCD.
So far I can get the LCD to display but it's often just "255".
According to the Nextion instruction set:

"All instructions over serial: are terminated with three bytes of 0xFF 0xFF 0xFF
ie: decimal: 255 or hex: 0xFF or ansichar: ÿ or binary: 11111111
ie byte ndt[3] = {255,255,255}; write(ndt,3); or print(“\xFF\xFF\xFF”); or print(“ÿÿÿ”) "

That explains the "255" so I'm currently working on a filter to catch a certain number of characters (what I'm actually sending) and then disregard the termination bytes and then I think we're in business at least with receiving data from the Nextion.
Have you had any success?
Sun Feb 10 2019, 13:57:51
(no subject) (by Tom J.)
This is what I have so far, The first section is attempting to ring count the string and break it down byte by byte.
The second section moves the bytes one at a time to variable SEND.
The third section sends the contents of variable SEND to LCD in order so I can see what's there.

The ladder is well commented, I believe the first section is not breaking the data stream down into individual bytes.
Sun Feb 10 2019, 17:16:32, download attachment SerialTest2.ld
(no subject) (by MGP)
Tom, take a good look at this code, how you can get a string or number.

https://cq.cx/ladder-forum.pl?...;parent=2080&tt=1432486553
Mon Feb 11 2019, 09:03:43
(no subject) (by Tom J.)
I'll never use the Nextion forum again after today's interaction but in short I learned there are no termination bits sent by the HMI when using the print command. My new data analyzer wasn't finding them because they aren't there apparently.
I'm toying around with a PIC to just echo now so I can get it down.
Sun Feb 24 2019, 20:56:06
(no subject) (by Ziggy)
I would like to bring to your attention the following libraries

http://www.rinkydinkelectronics.com/library.php

in particular check out UTFT collection of libraries.

While these libraries were prepared with Arduino in mind...the rest is up to your imagination
Sun Feb 24 2019, 21:39:15
(no subject) (by Tom J.)
I don't know that's going to be necessary, here's a screenshot of my data analyser.
I send a letter B with print "B" and it more or less cane through. I just need to read more here on the forum as to how to capture that data.
Sun Feb 24 2019, 22:57:34, download attachment Screenshot from 2019-02-24 13:10:27.png
NEXTION <==> LDMicro (by Helbert de Sá)

I was successful in interacting with the HMI NEXTION with LDMicro. Both in receiving and sending data by UART. It has some characteristics of LDMicro but you can develop a lot of interesting things.
Mon Sep 28 2020, 11:40:32
(no subject) (by Tom J.)
Yeah, Nextion is an interesting line, though the forum leaves a lot to be desired. I ended up going to Odroid SBCs and touchscreens. Still fairly cost effective and light years more capable.
I never got around to finishing up UART between Nextion and LdMicro, but I did get further when I was trying, if you have a good sample ladder please share it for future thrill seekers.
Mon Sep 28 2020, 12:52:02
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):