I'm trying to comunicate in serial my nextion 2.8" with my pic 18f2550 (microchip) but i don't know how i must send and receive data in asynchronous, i'm reading the tutorials and manuals but i don't find the command to read and write a byte as putsUSART() or ReadUSART() or getUSART() (talk in C lenguage)
I've create a button in the nextion display and in the "TouchPressEvent" wrote:
printh d0 a0
but when i push the button in my nextion hmi it's not send. I tried to connect in serial the nextion with my computer using hyperterminal but it don't receive data.
My questions are:
whats is the command to write a read a byte (or bytes) in serial?
What else should i do to transmit serial?
and what is this 0xFF 0xFF 0xFF in the end and when is it use in my communication protocol?
I am not familiar with the PIC, however, there would have to exist a serial library for the PIC by now.
Perhaps like the one found here
Then Nextion has various instructions like the get command, or page0.t0.txt="hello"
Hope this might be of some use.
Thank you for your contribution