PIC16F877A interface Lm016 16x2 JHD LCD. Using MikroC for PIC coding. Proteus + Hardware Demo.

Опубликовано: 22 Март 2026
на канале: Learning Microcontrollers
2,142
30

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,
This video is tutorial of using 16x2 LCD with PIC16f877a microcontroller. The great thing is its a tutrial using MikroC for PIC programming so you can use it with any PIC microcontroller using same method. All you need is only to define pins as selected.

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


Here is the code:
// Lcd pinout settings
sbit LCD_RS at RC0_bit;
sbit LCD_EN at RC1_bit;
sbit LCD_D7 at RD1_bit;
sbit LCD_D6 at RD0_bit;
sbit LCD_D5 at RC3_bit;
sbit LCD_D4 at RC2_bit;

// Pin direction
sbit LCD_RS_Direction at TRISC0_bit;
sbit LCD_EN_Direction at TRISC1_bit;
sbit LCD_D7_Direction at TRISD1_bit;
sbit LCD_D6_Direction at TRISD0_bit;
sbit LCD_D5_Direction at TRISC3_bit;
sbit LCD_D4_Direction at TRISC2_bit;

void main() {
LCD_init();
Delay_ms(500);

Lcd_Cmd(_LCD_CLEAR);
Delay_ms(100);

Lcd_Cmd(_LCD_CURSOR_OFF);
Delay_ms(100);
Lcd_Cmd(_LCD_CLEAR);
Delay_ms(100);

while(1)

{
Lcd_Out(1, 1, "LEARNING");
Delay_ms(2000);
Lcd_Out(2, 1, "MICROCONTROLLERS");
Delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR);
Delay_ms(100);


}
}