PIC16F877A interface Nextion HMI. Turning LEDs ON and OFF Tutorial. Softwares MikroC/Nextion Editor

Опубликовано: 24 Март 2026
на канале: Learning Microcontrollers
2,024
40

Guys, My lectures are free for everyone.
If you want to support my channel, then become a Youtube member by following link below:

   / @learningmicrocontrollers3561  

Seek knowledge from the cradle to the grave
/// /////////////////////////////////////////////////////**********************************///////////////////////////////// Hello guys,
Welcome to Learning Microcontrollers youtube Channel,

Guys I have also compiled course on Udemy as well. Where you will learn under my direct supervision in a more supervised way.
Here is the links to the courses I have on Udemy, By taking any of these courses you will be supporting my channel aswell.
This will help me to make more videos with better hardware in the future. I hope you look forward to it.
Courses Links:

1- https://www.udemy.com/course/pic16f87...
2- https://www.udemy.com/course/mikroc-f...
3- https://www.udemy.com/course/mikroc-f...
4- https://www.udemy.com/course/pic-micr...
5- https://www.udemy.com/course/learn-ar... ///////////////////////////////////////////////////// Hello Guys,
As you know touchscreens and HMI are part of every machinery found in the market. Or even small projects require these screens. To have strong grip on using touch screens and interfacing them with microcontroller is very important is necessary. This tutorial teaches you how to interface a Nextion touch screen with a PIC16F877A microcontroller to turn on and off LEDs using mikroC for PIC coding.

Become a Patreon and support my channel using link below:
https://patreon.com/user?u=81261678


MikroC code in the video is as under:

char read1;
void main() {
TRISD.F0 = 0;
PORTD.F0 = 0;
Delay_ms(100);
TRISD.F1 = 0;
PORTD.F1 = 0;
Delay_ms(100);

UART1_Init(9600);
Delay_ms(100);

while(1)
{
if (UART1_Data_Ready() == 1) {
read1 = UART1_Read();
Delay_ms(50);
}

if(read1 == 'a')
{
PORTD.F0 = 1;
Delay_ms(50);
}

else if(read1 == 'b')
{
PORTD.F0 = 0;
Delay_ms(50);
}

else if(read1 == 'c')
{
PORTD.F1 = 1;
Delay_ms(50);
}

else if(read1 == 'd')
{
PORTD.F1 = 0;
Delay_ms(50);
}




}
}