บทความ

กำลังแสดงโพสต์จาก กุมภาพันธ์, 2019

ตัวอย่างมินิโปรเจค20

รูปภาพ
rain detector circuit using pic microcontroller                                    rain detector circuit using pic microcontroller – raindrop sensor code // LCD module connections sbit LCD_RS at RC0_bit; sbit LCD_EN at RC1_bit; sbit LCD_D4 at RC2_bit; sbit LCD_D5 at RC3_bit; sbit LCD_D6 at RC4_bit; sbit LCD_D7 at RC5_bit; sbit LCD_RS_Direction at TRISC0_bit; sbit LCD_EN_Direction at TRISC1_bit; sbit LCD_D4_Direction at TRISC2_bit; sbit LCD_D5_Direction at TRISC3_bit; sbit LCD_D6_Direction at TRISC4_bit; sbit LCD_D7_Direction at TRISD5_bit; ////// rain detection circuit sensor variable/////// float rain_value; char text[10]; void main(void) { ADC_Init(); // it will initialize the adc module of pic16f877a microcontroller Lcd_Init(); // Initialize LCD Lcd_Cmd(_LCD_CLEAR); // Clear display Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor of...

ตัวอย่างมินิโปรเจค19

รูปภาพ
4x4x4 LED cube with PIC16F18877 code #include "mcc_generated_files/mcc.h" // test pattern 1111 //              1001  // 11111001 = 0xF9 // test pattern 1001 //              1111 // 10011111 = 0x 9F uint8_t lvl_0_h = 0xFf; uint8_t lvl_0_l = 0xff; uint8_t lvl_1_h = 0xF9; uint8_t lvl_1_l = 0x9f; uint8_t lvl_2_h = 0xf9; uint8_t lvl_2_l = 0x9f; uint8_t lvl_3_h = 0xFf; uint8_t lvl_3_l = 0xff; uint8_t myledd; uint8_t myledc; int count; void scan_cube(void){     // Select level 0 (top level)     LATB = 0x01;     // Scan columns     // We turn on two LEDs at a time, one from PORTD and one from PORTC        // Update RD7 and RC7         myledd = 0x00;        myledd = myledd | (lvl_0_h & 0x80);        LATD = ...

ตัวอย่างมินิโปรเจค18

รูปภาพ
Home Automation using Bluetooth and Mobile App อุปกรณ์ PIC 16F876A Microcontroller HC-06 Bluetooth Module ULN2803 Driver IC 8x 12V Sugar Cube Relays Voltage Regulator IC 7812 Voltage Regulator IC 7805 4x 1N4007 Diode 8MHz Crystal Red LED Orange LED 8x Green LED 1000uF Capacitor 3x 100uF Capacitor 10uF Capacitor 1uF Capacitor 0.1uF Capacitor 2x 22pF Capacitor 10KΩ Resistor 1KΩ Resistor 10x 680Ω Resistor code int cnt,t,st; void interrupt() { if(UART1_Data_Ready()) // If data received { RCIE_bit = 0; if(cnt == 0) //If it is the first character { if(UART1_Read() == 'A') // Check whether it is the valid character { cnt = 1; TMR1L = 0; TMR1H = 0; TMR1ON_bit = 1; // Start the timer for timing out } } else if(cnt == 1) // If second character { t = UART1_Read() - 48; cnt++; } else if(cnt == 2) // If thi...

ตัวอย่ามินิโปรจค17

รูปภาพ
19 IR Remote Controlled Home Automation using PIC Microcontroller IR Remote Controlled Home Automation using PIC Microcontroller ELECTRONICS By Saddam   May 11, 2017 29 IR Remote Controlled Home Automation using PIC Microcontroller In this project, we are going to use a PIC microcontroller to remotely control few AC loads by just using an IR remote. A similar project  IR remote controlled Home automation  has already been done with Arduino also, but here we designed it on PCB using  EasyEDA ’s online PCB designer and simulator, and used their PCB designing services to order the PCB boards as shown in the subsequent section of the article.  At the end of this project you will be able to toggle (ON/OFF) any AC load using an ordinary Remote from the comfort of your Chair/Bed. To make this project more interesting we have also enabled a feature to control the speed of the fan with the help of Triac. All these can be done with simple...