PIC18 MCU USART settings?

Hi

I trying to connect Nextion LCD to PIC18 controller

What exactly are Nextion RS232 protocol settings ?

Stop bit , Parity , Idle Low or High ?

Thank you

Hi,

8 data bits, no parity, one stop bit.

Standard Arduino (or similar controller) values works fine.

1 Like

Once you have the serial port setup correctly at 9600 baud, then send some data out the serial port:
t0.txt=“Hello” for example to write Hello into the first text box.

putch “0x74” //t
putch “0x30” //0
putch “0x0E” //.
putch “0x74” //t
putch “0x78” //x
putch “0x74” //t
putch “0x3D” //=
putch “0x22” //"
putch “0x48” //H
putch “0x65” //e
putch “0x6C” //l
putch “0x6C” //l
putch “0x6F” //o
putch “0x22” //"
putch “0xFF” //
putch “0xFF” //
putch “0xFF” //

I just typed this up from memory while on lunch, but you should get the idea. My real function uses sprintf to send the string but the control text uses putch until I figure out a better way.

Thank you, guys. I did it.