Home Community

HI
Welcome, Guest. Please login or register.
May 24, 2013, 02:38:14 AM
Home Help Search Calendar Login Register
News: trade your components on this new board: "Components trade"

Advertisements
No New Posts
Today at 01:39:33 AM
in
Advertisements
by google

+  Electronics-Lab.com Community
|-+  Electronics Forums
| |-+  Projects Q/A (Moderators: gogo2520, Herman the German, Hero999)
| | |-+  HI
« previous next »
Pages: [1] Print
Author Topic: HI  (Read 435 times)
devakuamr
Newbie
*
Posts: 1


View Profile Email
HI
« on: November 28, 2011, 09:49:34 AM »

HI SIR CAN U TEACH ME WHATS THE PROGRAMMING OF MY PROJECT


                                                       APPENDIX A
//====================================================================
//Author: Devakumar
//Project: Solar powered surveillance system
// This source code is used in my project]
//====================================================================

#include <16f877a.h>
#include <math.h>
#include <stdlib.h>

#fuses HS,NOWDT,NOPROCTECT,NOLVP
#use delay (clock=20000000)
#use rs232(baud=19200,xmit=PIN_C6,rcv=PIN_C7,PARITY=N.BITS=8)
#org 0x100,0x1FFF void loader 16f877 (void) {}         //16f677A

//input definition
//====================================================================
#define STO_in_A PIN_A1    //pin3
#define STO_in_B PIN_A2    //pin4
#define CONT_A  PIN_A3    //manually control   //pin5
#define CONT_B  PIN_A4    // Automatic        // pin6
#define cont_C      PIN_A5   // pin7
#define SENSOR PIN_C1   //pin16

//output definition
//====================================================================
#define PIC_A                             0  //PIN_B7
#define PIC_B             1              //PIN_B6
#define CAM_A          2             //PIN_B5
#define CAM_B           3         //PIN_B4
#define BUZZER         4        //PN_B3


#define Power_A          5         //PIN_B2
#define Power_B          6         //PIN_B1



#define ON                                1
#define OFF                               0
#define NO_DELAY                  0

Int 16 adc_result;
Int channel_mov, channel _ photo, t;
Int8 ctr ;
Int8 value;

void outssignal(int8 signal_out,int8 state 1,int8 delay_ms1)
{
If signal _out==0)
{
If(state 1 ==0) output_low(PIN_B7);     //pin40
else output_high(PIN_B7);
}


if(signal_out==1)
{
If(state1==0) output_low(pin_B6);     //pin39
else output _high(pin_B6);
}

if(signal_out==2)
{
If(state1==0) output_low(pin_B5);     //pin38
else output _high(pin_B5);
}


if(signal_out==3)
{
If(state1==0) output_low(pin_B4);     //pin37
else output _high(pin_B4);
}

if(signal_out==4)
{
If(state1==0) output_low(pin_B3);     //pin36
else output _high(pin_B3);
}

if(signal_out==5)
{
If(state1==0) output_low(pin_B2);     //pin35
else output _high(pin_B3);
}


if(signal_out==6)
{
If(state1==0) output_low(pin_B1);     //pin34
else output _high(pin_B1);
}

delay_ms(delay_ms1);
}
//main function
//====================================================================
main()

{
set_tris_A(0b11111111);
setup_adc(ADC_CLOCK_INTERNAL);
setup_adc_ports(RA0_ANALOG); //setup_adc_ports(RA0
t=20;
printf(Start\r\n
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Advertisements
No New Posts
Today at 01:39:33 AM
in
Advertisements
by google


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!

 

 

Search Site | Advertising | Add your link here | Contact Us | Android TV Box
Elektrotekno.com | Free Schematics Search Engine | Electronic Kits | Electronic Accessories