Nextion LCDs... How to comunicate ???


+ Reply to Thread
Results 1 to 30 of 30
  1. #1
    Join Date
    Apr 2015
    Posts
    3

    Default Nextion LCDs... How to comunicate ???

    Hello everyone. How to communicate with Nextion Lcds using PBP ??? Link: https://www.itead.cc/wiki/Nextion_HMI_Solution
    Attached Images Attached Images  

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    You control the LCD through TTL RS232 (only Tx and Rx needed).

    Also you must ensure good +5V/1A to the LCD.

    The rest on the users manual.
    Ioannis

  3. #3
    Join Date
    Apr 2015
    Posts
    3

    Default Re: Nextion LCDs... How to comunicate ???

    Hello Ioannis, thank you for the feedback.
    I did not find examples for PBP on the internet. In the manual there are only examples for uses with Arduino and RaspBerry Pi.
    I could not convert the command used in Arduino to be used in PBP.
    My question is about the serial command format to use.

    Thank you for any help.

  4. #4
    Join Date
    Oct 2009
    Posts
    582

    Default Re: Nextion LCDs... How to comunicate ???

    From what I can gather it uses a serial connection - so have a look at serial examples for PBP and then adapt them to send the instructions to the device. There is an example here http://support.iteadstudio.com/suppo...cs/11000012477 where someone is using an arduino without any library files, which may help

    You should be able to used hserout command with a PIC that has a UART serial port (most do)

  5. #5
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    I also ordered a module, waiting for delivery. Meanwhile, I've downloaded their IDE. Looks like Visual Studio, but so far, I have not managed, how to put my own text on label Very alogical design...

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    Mike's tutorial on Nuts n Volts is good starting point.

    Also the tutorials on YouTube are very helpful. There are many that take you step by step.

    Ioannis

  7. #7
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    Starting on Page 16:

    http://nutsvolts.texterity.com/nutsv...&folio=16#pg16

    It will be a 7 Part series, next issue: Communication between the Nextion and a PIC (using PBP3)

  8. #8
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    Great. I've quit reading N&V a decade ago - too many ads and too many nonsense articles, hope they've changed that....

  9. #9
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    Can't figure out, how to make textbox background transparent - when I set it to "image" it gives error during compile...

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    In the sta attribute select crop image

    Ioannis

  11. #11
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    Yes and it immediately gives an error after that.

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    There is a new version 0.59. Which version you have?

    Ioannis

  13. #13
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    After you select "crop image" a new box will appear in Attributes called "picc". Click on it, click "browse", then select your background image.

  14. #14
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    Yes, I got it working, but in a weird way.

    Say I have some background picture, which I place on background layer.
    Then I have textbox above it. Located at specified place.
    I have to crop background picture in editor, in a such way, that it fits the area occupied by textbox.
    Then use that cropped picture as textbox background.

    There is simply no way to make text background "transparent".

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    I do not know why it is not working for you.

    Please send to me your email and I will reply with the demo file that just work! You can go on and do your mods then.

    Ioannis

  16. #16
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    Since writing that first article I learned something new. Instead of placing a Picture the size of your screen, start with an empty screen. Choose "image" for sta. Then picc, browse, select your background image.

  17. #17

    Default Re: Nextion LCDs... How to comunicate ???

    Hi Mike,

    Just received the latest Nuts & Volts with your Nextion article, good work. Wish I had this two years ago!

    If you like writing articles, B4A is now free and programs much like the Nextion or VB. Probably a lot interest with hobbyist. I've made android apps to communicate with HC-05 Bluetooth modules connected to pic micros.

    https://www.b4x.com/b4a.html

  18. #18
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    Mike, the latest issue of Nuts'n'Volts does not have your new article on Nextion displays as promised on article 5.

    Was this on error?

    Ioannis

  19. #19
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    They were taking so long to get to the next issue I thought I had plenty of time to get them done. Unfortunately, they decided to get on the ball (well, unfortunately for me) and start cranking out magazines. I got stuck with a cold NE winter and the inability to get the 6th article finished. Warmer weather is rapidly approaching, so I should be back on things to get the next one out (and the last 7th one shortly thereafter). My apologies.
    Last edited by mpgmike; - 20th March 2021 at 00:13.

  20. #20
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    No problem. I thought that you ended your cooperation with the magazine.

    Wish you the best,
    Ioannis

  21. #21
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    No, I submitted 2 other non-related articles not yet published. I fully expected one (at least) in the current issue; but alas, it wasn't to be.

  22. #22

    Default Re: Nextion LCDs... How to comunicate ???

    Could someone please confirm exactly which issues these articles are in so I can buy them.

    Thanks

  23. #23
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    2020, Issues 4, 5, & 6
    2021, Issues 1 & 2

    I still owe 2 more articles, but perhaps I'm anal in that I want them to be "as good as I can make them" before submitting, and I'm still working (diligently, I might add) on them.

  24. #24
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    The later IDE support animation and video. Maybe you can include these features also?

    Ioannis

  25. #25
    Join Date
    Feb 2013
    Posts
    730

    Default Re: Nextion LCDs... How to comunicate ???

    LOL I can't make on screen button to change value on some pin, animations? too early

  26. #26
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    Quote Originally Posted by Ioannis View Post
    The later IDE support animation and video. Maybe you can include these features also?

    Ioannis
    The "Basic" series doesn't support these features. You must use the "Intelligent" stuff for that. If using higher end Nextion, you may not need the PIC.

  27. #27
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    Yes, I do have a 10" one to test it. The demo that is loaded is very interesting but they do not have it on-line. Unfortunately I have not figured how one can do such a programming on these LCD's.





    These videos are from the demo 10" capacitive LCD.

    Ioannis

  28. #28

    Default Re: Nextion LCDs... How to comunicate ???

    Hi mpgmike.

    Do you have any comments about adapting your example code from the magazine article for a PIC18LF26K80 at 64mhz?

    Not sure if I was allowed to post it here? But it is downloadable from the N&V site.

    Thanks Peter

  29. #29
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    391

    Default Re: Nextion LCDs... How to comunicate ???

    The article used a PIC16F18426, because that's what I needed for the Small Engine Ignition Timing Controller. Using a PIC18F would require different CONFIGs and probably different SFR bits, but should work otherwise just talking to the Nextion. The K80 doesn't have enough Timers to do the full Timing Controller project.

    As for those videos, just upload 4 or 8 frames of the moving picture. Use the Timer feature (tm0) with a Variable (va0) to track sequence and the vis command to show each picture in sequence. Timer code should look like this
    Code:
    if(va0.val==1)
    {
     vis p0,1
     vis p1,0
     vis p2,0
     vis p3,0
    }else if(va0.val==2)
    {
     vis p0,0
     vis p1,1
     vis p2,0
     vis p3,0
    }else if(va0.val==3)
    .....
    }
    va0.val+=1
    if(va0.val==5)
    {
     va0.val=1
    }

  30. #30
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,095

    Default Re: Nextion LCDs... How to comunicate ???

    Great! Thanks Mike.

    Ioannis

Similar Threads

  1. Two LCDs on one PIC
    By NavMicroSystems in forum Schematics
    Replies: 6
    Last Post: - 29th January 2013, 06:56
  2. LCDs
    By Demon in forum Adverts
    Replies: 1
    Last Post: - 21st April 2012, 02:14
  3. Two LCDs on one PIC
    By lester in forum FAQ - Frequently Asked Questions
    Replies: 3
    Last Post: - 22nd February 2005, 02:28
  4. Typles of LCDs
    By mslaney in forum General
    Replies: 1
    Last Post: - 16th December 2004, 14:01
  5. Graphic LCDs
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th April 2004, 10:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts