helpp!!! PIC 16F877A + PIR SENSOR

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

helpp!!! PIC 16F877A + PIR SENSOR

Postby davidrefi » Mon Dec 26, 2011 11:17 am

hiii all master, i'am newbie, anyone know , how to connect PIC 16F877A with PIR SENSOR interface(code) , i'am using Hitech compiler in MPLAB.thx :cry:
davidrefi
Freshie
 
Posts: 6
Joined: Mon Dec 26, 2011 11:12 am

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby ABSF » Mon Dec 26, 2011 12:39 pm

You can refer to the schematics and software here

PR14
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby shahrul » Mon Dec 26, 2011 2:00 pm

This is only digital input. See this PIR example.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby davidrefi » Mon Dec 26, 2011 2:14 pm

mr.shahrul. i'am still blur... i just wanna connected SK40C(pic 16F877A) to my PIR sensor, so that mean my sensor can work using the interface(code) from MPLAB.
bcoz in ur blog u mix buzzer + pir, so that code make me confused.thx
davidrefi
Freshie
 
Posts: 6
Joined: Mon Dec 26, 2011 11:12 am

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby shahrul » Mon Dec 26, 2011 3:07 pm

davidrefi WROTE:mr.shahrul. i'am still blur... i just wanna connected SK40C(pic 16F877A) to my PIR sensor, so that mean my sensor can work using the interface(code) from MPLAB.
bcoz in ur blog u mix buzzer + pir, so that code make me confused.thx

The buzzer and PIR connected to PIC.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby robosang » Wed Dec 28, 2011 9:12 am

Study the schematic, and the code... take off those not in use.

Microcontroller is combination of hardware and software, but must be correct in order to work ;)
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby ZaM » Thu Dec 29, 2011 7:28 pm

PIR output pin is digital output same as normal switch, except PIR have delay when trigger.. try this, RB0= PIR output pin

if(RB0=0)
{
do_something;
}
ZaM
Moderator
 
Posts: 78
Joined: Tue Nov 23, 2010 4:16 pm

Re: helpp!!! PIC 16F877A + PIR SENSOR

Postby robosang » Thu Dec 29, 2011 9:22 pm

ZaM WROTE:PIR output pin is digital output same as normal switch, except PIR have delay when trigger.. try this, RB0= PIR output pin

if(RB0=0)
{
do_something;
}


the code... should be
If (RB0 == 0)
{
do something
}
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 0 guests

cron