Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pic16f877a interface with kepyad and lcd and rf wireless connection

Status
Not open for further replies.

R PUSPARAJA

Newbie level 4
Joined
Oct 20, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
hi....i realy need help on my final year project...please help me...
my project is wireless monitoring home alarm system

i using PIC16F877A
i need interface lcd and keypad on that pic...
please guide me... and i need coding for that..please help me...
i also need interface wireless using RF frequence from this pic to another pic16f877a...i need transfer data...
atcually i have 2 sensor/...pir sensor and magnetic sensor...whn any of it trigger the pic will send the data using wireless to another pic n display in lcd tht 'pic sensor detect' or 'magnetic sensor detect' ...
please help me...
1st pic
need interface keypad n lcd... need set password in keypad..n display in lcd..welcome thn passowrd... and access denied if wrong password, if correct ;accepted'... please help me
 

I can maybe help but need more information.

Are you using a board that's already made or do you have a circuit diagram?

Are you using MPASM assembly language or some sort of compiler (BASIC, C, etc.)

Have you done any programming before?

Have you chosen your LCD yet? If not I can suggest one and supply MPASM code for it.

Have you chosen what format your wireless will use? If not then this SparkFun Electronics is an excellent tutorial.

Depending on the environment, you might also consider IR communications using the serial ports on the PICs.

Ted
 

Dear friend,

This a simple program for lcd display.Here i used mikroC,just copy paste the program

void main()
{
trisb=trisd=0;
Lcd8_Config(&portd,&portb,0,2,1,7,6,5,4,3,2,1,0);
Lcd8_Out(1,1,"hello");

//Delay_ms(5000);
}
 

im using 16x 2 LCD
using PCW compiler...
wireless
TX-433
TX-315
RX-433
RX-315

which port use lcd n keypad, and which port use sensors as input and which port use encoder HT12E ? please advise me....

---------- Post added at 15:29 ---------- Previous post was at 14:55 ----------

i need advise..
this code taken from my fren project...this code to set interupt

Program Code for PIC at Transmitter
;======================= Define Variables ========================
int i,k,k1;
void zone_checker();
void status_checking();

;========================= Interrupt ===========================
void interrupt(){
Delay_ms(50);
if(portb.f0==1){
zone_checker();
portb.f4=0;
portb.f3=0;
delay_ms(1000);
portb.f3=1;}
INTCON.f1 = 0;} // clear the int flag
;======================= Main Function ==========================
void main () {
trisb= 0b00000001;
portb= 0b00001000;
INTCON.f7=1; //going to use an interrupt
INTCON.f4=1; //RB0 will be an interrupt
trisc= 0b11110000;
portc= 0;
trisd= 0b00001100;
portd= 0;
while(1){
status_checking();}}


Program Code for PIC at Receiver

;======================= Define Variables ========================
unsigned short kp;
int i,m=1,k,n=0,a,x=0,y=0,q=0,o=0,e=0,l=0,t=0,u=0,h=0;
int qq=0,oo=0,ee=0,ll=0,tt=0,uu=0,hh=0;
int qqq=0,ooo=0,eee=0,lll=0,ttt=0,uuu=0,hhh=0;
;======================= Subroutines ============================
void alarm();
void remote();
void remote1();
void status_checking();
void zone_check();
void status_configure();
;======================= Interrupt Subroutine ======================
void interrupt(){
Delay_ms(1100);
alarm();
if(x==0){
zone_check();
x++;}
status_checking();
INTCON.f1 = 0;} //clear the int flag
;======================= Main Function ===========================
void main(){
trisb = 0b00000001; // Configure port B
portb = 0; // Initialize port B as 0
INTCON.f7=1; // going to use an interrupt
INTCON.f4=1; // RB0 will be an interrupt
ADCON1 = 0x06 ; // Changes PORTA to digital
CMCON = 0x07 ; // Disable analog comparators
TRISA = 0x0F ; // Configure port A

PORTA = 0; // Initialize port A as 0
TRISC = 0x0F; // Configure port C as input
PORTC = 0; // Initialize port C as 0
TRISD = 0x00; // Configure port D as output
PORTD = 0; // Initialize port D as 0
while(1) {
remote();
if(portd.f0==1)
{kp=0;
do{ // alarm will stop automatically in 15s
Delay_ms(1000); // if not turn off
kp=kp++;
remote1();}
while(kp!=15);
do
{portd.f0=0;} // turn off alarm and keep looping
while(1);}}}


if i want make more interrupt how it possible???
 

Dear friend,

Actually pic16f877a has 4 ports.

You can use portd for lcd,portb for keypad and portc for RF.Use porta for sensors.
I am not familir with your language, so try yourself I will sufficient logic for u.
 

thank you for your advice... ok 1st pic i use as u said..portd for lcd,portb for keypad and portc for RF.Use porta for sensors.
than next pic16F877A which will connected with receiver...that pic use which port as receiver and which port as display LED as output? can recommend which programming to use? is that PCWHD software suitable for to coding ? may i can get coding... although not all but the starting..please help me....
 

Dear friend,

Use portd for led display and portc for rf receiver .If you are expert in PCWHD then that is better, but i use Mikro c.
 

MikroC could be easier because it has a looot of resources.
 

i got download MikroC software, but the compiler icon invisible.why? where i can get license key? can give the key? please send to my email pusparaja_09@yahoo.com.
can send the link to download C programming? please help

---------- Post added at 12:42 ---------- Previous post was at 10:44 ----------

hi...his is coding for transmitter using pic compiler

#include <16f877.h>
#fuses HS,NOLVP,NOWDT,NOPROTECT
#use delay(clock=20000000) // 20 MHz crystal on PCB
//#use rs232(baud=19200, xmit=PIN_A0, rcv=PIN_A1) // you can use any pins for software uart...
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,UART1) // hardware uart much better; uses RC6/TX and RC7/RX
// characters tranmitted faster than the pic eats them will cause UART to hang.

#include <stdlib.h>

#define LED_0 PIN_B0

void main() {
while (TRUE) {
if (input(PIN_D0)){
output_high(LED_0);
printf("a"); //sends signal a
}
else{
output_low(LED_0);
printf("b"); //sends signal b
}

}
}
this coding function, i want add more sensor but dont know how..please help me...
from this coding the sensor connected to PIN DO
void main() {
while (TRUE) {
if (input(PIN_D0)){
output_high(LED_0);
printf("a"); //sends signal a

HOW TO CONNECT MORE SENSOR and how to upgrade this coding..please help...

and also from this coding use #use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,UART1)

if i use trasmitter tws 434 how to connect it? is that need Encoder HT12E?
please advice me..
 

Dear friend,

I have already told you i am not familiar with your language.

#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,UART1)

This means serial communication settings (RF reading)

For adding more sensor , use more pins for sensor and make as input.

check your personal mail
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top