Posts

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      ...

ATMEGA328 Standalone Project

Image
Install Arduino Minicore  Open Arduino IDE Click File-Preferences Additional Board Manager URL enter the Link  //mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json click OK. Go to Tools-Boards- Board Manager type Minicore- Minicore MCU dude Version 2.1.3 click Install, After installation close and restart Arduino IDE. Circuit Diagram for Burn Bootloader to Atmega328 microcontroller Go to Tools and Follow these setting For Burn bootloader Circuit Diagram for Upload a Sketch to Atmega328 microcontroller Go to Tools and Follow the setting for Upload a sketch to Atmega 328 int del = 50; //defining delay value (0.1 second) int del1 = 1000; //defining delay value (1 second) void setup() {   // put your setup code here, to run once:   pinMode(0, OUTPUT);//defining pins (0-13) as Outputs   pinMode(1, OUTPUT);   pinMode(2, OUTPUT);   pinMode(3, OUTPUT);   pinMode(4, OUTPUT);   pinMode(5, OUTPUT);   pinMode(6, OUTPUT);   pinM...

LED Blinking with PIC16F627A Microcontroller in MPLAB IDE

Image
  #include <stdio.h> #include <stdlib.h> #include <xc.h> #define _XTAL_FREQ 2000000 __CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & BOREN_OFF & LVP_ON & CPD_OFF & CP_OFF); void main()  {     TRISA = 0;// set all pins of Port A as OUTPUT     TRISB = 0;// set all pins of Port B as OUTPUT     while(1)// Infinite Loop to execute the code Continuously.     {      RA0=1;//Turn HIGH the Pin A0 at portA     RB0=0;//Turn LOW the Pin B0 at portB      __delay_ms(1000); //Delay 1 second     RA0=0;//Turn LOW the Pin A0 at portA     RB0=1;//Turn HIGH the Pin A0 at portB     __delay_ms(1000); //Delay 1 second     }      }

Blinking Led with PIC12F675

Image
  // CONFIG #pragma config FOSC = INTRCCLK  // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN) #pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled) #pragma config PWRTE = OFF      // Power-Up Timer Enable bit (PWRT disabled) #pragma config MCLRE = ON       // GP3/MCLR pin function select (GP3/MCLR pin function is MCLR) #pragma config BOREN = OFF      // Brown-out Detect Enable bit (BOD disabled) #pragma config CP = OFF         // Code Protection bit (Program Memory code protection is disabled) #pragma config CPD = OFF        // Data Code Protection bit (Data memory code protection is disabled) // #pragma config statements should precede project file includes. // Use project enums instead of #define for ON and OFF. #define _XTAL_FREQ 4000000 #include <xc.h>  void...

LED Chaser With PIC16F628A Microcontroller in MPLAB IDE

Image
 https://github.com/anokhramesh/LED-Chaser-with-PIC16F628A

Button Latch switch with PIC16877A Microcontroller in MikroC programming

Image
 https://github.com/anokhramesh/Button-Latch-Switch- https://drive.google.com/drive/folders/1L9iMF3p34olO8DLbUSlQdiDH9whV04us?usp=sharing MikroC code #define SW1 PORTD.RD4 #define SW2 PORTD.RD5 #define SW3 PORTD.RD6 #define SW4 PORTD.RD7 void main() {      TRISB = 0X00;      PORTB = 0X00;            // Clear PORTB      while(1){               if(SW1==1){                          PORTB.F0 = ~PORTB.F0;    // Toggle RB0                          while(SW1==1);     // switch debounce                          }               if(SW2==1){                          PORT...