Posts

automatic staircase lighting using pic16f676 and sr04 ultrasonic sensor

Image
PROGRAM  #chip 16F676,0 #config MCLRE=OFF   ;Include files (Libraries)   #include <srf04.h>   dir PORTc.2 out   dir portc.4 out   dir portc.3 out #define US1Ping PORTc.0 #define US1Echo PORTc.1 #define checkdistance 50 Dim detect as word set portc.2 on wait 1 s set portc.2 off   Do   set portc.4 on   wait 50 ms   set portc.4 off   wait 50 ms   set portc.4 on   wait 50 ms   set portc.4 off   wait 500 ms   match = USDistance(1)             if match < checkDistance then                       Set PORTc.2 On                       wait 10 s                        Set PORTc.2 Off             Else                       Set PORTc.2 Off             end if             Loop HEX CODE HOW TO HEX USE HEX CODE  COPY THE CODE BELOW TO ANY IDE AND SAVE THIS WITH EXTENSION AS .HEX.THATS IT.DOWNLOAD THIS .HEX FILE DIRECTLY TO IC :020000040000FA :020000000528D1 :1000080009005620642083160

EGG INCUBATOR TEMPERATURE CONTROL UNIT

Image
Here is a full circuit diagram of automatic temperature controller for egg incubator.   CIRCUIT DIAGRAM COMPONENTS REQUIRED  IC pic16f876a Lm35 LCD 16*2 Transformer 12v Diode-1N4007 Regulator LM7805 Capacitor Resistors Relay Transistor SL100 LED Bulb holder Get the program updates.. PROGRAM #Chip 16f876a, 16 dir porta.0 in #define USART_BAUD_RATE 9600 #define LCD_IO 4 #define LCD_RS PORTB.0 #define LCD_RW PORTB.1 #define LCD_Enable PORTB.2 #define LCD_DB4 PORTB.3 #define LCD_DB5 PORTB.4 #define LCD_DB6 PORTB.5 #define LCD_DB7 PORTB.6 dir portc.6 out dir portc.3 out dir portc.2 out dim test as word DIM COMPARE AS WORD COMPARE=35 dim analog as word wait 1 s LOCATE 0,0 PRINT "ELECTROTECHYS" LOCATE 1,0 PRINT "MEDIA" HSerPrint "ELECTROTECHYS MEDIA" Wait 1 S hserprint "_" wait 3 s CLS     Do     LOCATE 0,0  print "INCUBATOR"

PIC16F877A LED BLINK PROGRAM

Image
BREAD BOARD CONNECTION PROGRAM #chip 16f877a,16 dir portb.0 out Do Forever set portb.0 on wait 1 s set portb.0 off wait 1 s Loop After compiling PROGRAM ,open pic kit 2 programming software. GOTO FILES>IMPORT >goto the location we save and compile the program.The hex data is visible at the folder ie the file we need to burn to the IC. HEX FILE This file is automatically generated in IDE while compiling. :020000040000FA :060000008A110A12052816 :1000080009002C2083160313061083120313061409 :100018000130F400242006100130F40024200928BF :1000280063001428F30A6C30F1000B30F000F00B79 :100038001B28F10B1928F20B1728F30B17280800B7 :10004800E830F2000330F3001620F40B24280800EF :10005800831603139F13831203131F1083160313AE :100068009F111F159F141F1007309C008312031344 :0C007800850186018701880189010800CC :02400E007A3FF7 :00000001FF Why we need hex file Hex file is the only file needed for the IC to work.If we are no using the IDE just copy

ARDUINO MUSIC PLAYER

Image
This is an arduino atmega328 based audio player.The file type is wav with 8 bit format.Download the sample wav files & LIBRARIES in the link itself. CONNECTIONS PROGRAM #include <SD.h>                      // need to include the SD library #define SD_ChipSelectPin 4  //using digital pin 4 on arduino nano 328, can use other pins #include <TMRpcm.h>           //  also need to include this library... #include <SPI.h> TMRpcm tmrpcm;   // create an object for use in this sketch void setup(){   tmrpcm.speakerPin = 9; //5,6,11 or 46 on Mega, 9 on Uno, Nano, etc   Serial.begin(9600);   if (!SD.begin(SD_ChipSelectPin)) {  // see if the card is present and can be initialized:     Serial.println("SD fail");       return;   // don't do anything more if not   }  tmrpcm.setVolume(5);   tmrpcm.play(" electrotechysmedia1 .wav"); //the sound file "music" will play each time the arduino powers up,

ARDUINO-ALANWALKER-FADE

Image
This is an arduino atmega328 based audio player.The file type is wav with 8 bit format.Download the sample wav files & LIBRARIES in the link itself. CONNECTIONS PROGRAM #include <SD.h>                      // need to include the SD library #define SD_ChipSelectPin 4  //using digital pin 4 on arduino nano 328, can use other pins #include <TMRpcm.h>           //  also need to include this library... #include <SPI.h> TMRpcm tmrpcm;   // create an object for use in this sketch void setup(){   tmrpcm.speakerPin = 9; //5,6,11 or 46 on Mega, 9 on Uno, Nano, etc   Serial.begin(9600);   if (!SD.begin(SD_ChipSelectPin)) {  // see if the card is present and can be initialized:     Serial.println("SD fail");       return;   // don't do anything more if not   }  tmrpcm.setVolume(5);   tmrpcm.play("alan .wav"); //the sound file "music" will play each time the arduino powers up, or is reset }

Arduino At89s52 programmer

Download Software Click here Download arduino file Clickhere

ARDUINO SEVENSEGMENT DISPLAY INTERFACING

PROGRAM (COMMON ANODE DISPLAY) int num1=0; int digit1=0; int counter=0; void setup() {   DDRD=0xff; } void loop() {   if(counter>9)   {     counter=0;   }   num1=counter;   counter=counter+1;  if(num1==0) {    PORTD=0b11000000; } if(num1==1) {     PORTD=0b1111001; } if(num1==2) {     PORTD=0b0100100; } if(num1==3) {     PORTD=0b0110000; }     if(num1==4)     {     PORTD=0b0011001;     } if(num1==5) {     PORTD=0b0010010; } if(num1==6) {     PORTD=0b0000010; } if(num1==7) {     PORTD=0b1111000; } if(num1==8) {     PORTD=0b0000000; } if(num1==9) {     PORTD=0b0010000; } delay(2000); }