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
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):