Posts

Showing posts from July, 2022

Interfacing 16x2 LCD screen with PIC 16F877A Microcontroller in 4 Bit Mode

Image
  Download link https://github.com/anokhramesh/16x2-LCD-with-PIC16F877A /*INTERFACING 16x2 LCD screen with PIC16F877A Microcontroller in 4 Bit mode  ANOKHAUTOMATION  https://microcontrollerslab.com/lcd-interfacing-pic16f877a-microcontroller/*/ #include <xc.h> __CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & BOREN_OFF & LVP_OFF & CPD_OFF & WRT_OFF & CP_OFF); #define _XTAL_FREQ 10000000 void display(int a,int b);//function call char name[]={"ANOKH-AUTOMATION"};//char array void main(void) {     TRISB0=TRISB1=TRISB4=TRISB5=TRISB6=TRISB7=TRISC0=0;// Set PORTB0,1,2,3,4,5,6,7 and PORTC0 as OUTPUT     TRISB2=1;// set PORTB2 (PIN35) as INPUT(connect Push Button)     RC0 =0; // set PORTC0 (PIN15) as OUTPUT(connect LED)          display (0x02,0);//Command for change LCD to 4 Bit Mode     display (0x01,0);//Command for clear screen     display (0x0c,0);//command for display ON,Curso...

4Button Latch with PIC 16F877A Microcontroller in PMLAB IDE

Image
Download links Binary file-- https://drive.google.com/file/d/1epSNl9kr73Ob__JnYGZGZBSZXIOtD9uE/view?usp=sharing MPLAB.C file-- https://drive.google.com/file/d/1IWnJpzJBHXN1jPJR-MjLUkMWEC-_hVfG/view?usp=sharing   Proteus Circuit--   https://drive.google.com/file/d/1epSNl9kr73Ob__JnYGZGZBSZXIOtD9uE/view?usp=sharing /*MPLAB Code for 4 button Latch with PIC16F877A  * File:   4Buttonmain.c  * Author: Anokhautomation  *  * Created on July 12, 2022, 12:02 AM  */ #include <xc.h> __CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & BOREN_OFF & LVP_OFF & CPD_OFF & WRT_OFF & CP_OFF); #define _XTAL_FREQ 10000000 #define SW1 RD4//connect button 1 to Pin RD4 #define SW2 RD5//connect button 2 to Pin RD5 #define SW3 RD6//connect button 3 to Pin RD6 #define SW4 RD7//connect button 4 to Pin RD7 void main(void) {   TRISB = 0X00;//Set PORTB pins to OUTPUT  PORTB = 0X00; // at Initial, value of PORTB are 0      ...