PIC16F877A Interface Air Quality sensor using Analogue Output pin. Tutorial.

Опубликовано: 22 Октябрь 2024
на канале: Learning Microcontrollers
249
15

Hello guys,
You can support my channel by buying this post on patreon its just 5$ one time only donation.
https://www.patreon.com/posts/guys-yo...

/
/
/
/
/
//////////////////////////////////////// Work Hard Play Hard Hello guys Welcome to learning microcontrollers,
Guys I had made a course for you guys on Udemy.
This course will teach you how to directly get your hands dirty on arduino and make useful projects to earn money.
Please do take this course on udemy this will greatly help me to grow my channel.
You will assisting my channel by paying for that course.
Here is the link to the course:


https://www.udemy.com/course/learn-ar...


A quote:
Learn from cradle to grave.
/
/
/
////////////////////// Hello Guys,
Welcome to learning Microcontrollers.
I had made a course for you guys to learn under my direction supervision on Udemy.
This course will make you a master of PIC microcontroller based projects making using MikroC for PIC software.
Please do take this course the link is below. This will greatly help my channel aswell to grow.
https://www.udemy.com/course/pic-micr...

A beautfiul quote:
The road to sucess is always under construction.
/
/
///////////////////////////////////////////////////// MikroC for PIC code in video is as under:

// Lcd pinout settings
sbit LCD_RS at RC0_bit;
sbit LCD_EN at RC1_bit;
sbit LCD_D7 at RC4_bit;
sbit LCD_D6 at RD3_bit;
sbit LCD_D5 at RD2_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 TRISC4_bit;
sbit LCD_D6_Direction at TRISD3_bit;
sbit LCD_D5_Direction at TRISD2_bit;
sbit LCD_D4_Direction at TRISC2_bit;

int air;
char air1[5];
void main() {
Lcd_Init();
Delay_ms(50);
ADC_Init();
Delay_ms(50);
Lcd_Cmd(_LCD_CURSOR_OFF);
Delay_ms(10);
Lcd_Cmd(_LCD_CLEAR);

while(1)
{
air = ADC_Read(0);
Delay_ms(30);
IntToStr(air, air1);
Delay_ms(20);
Lcd_Out(1, 1, air1);
Delay_ms(150);
Lcd_Cmd(_LCD_CLEAR);

}
}