Hey
I want help to write C code for my project about Wireless home security system
i got problem to write C code for pic16F877
im used mplab with CCSc complier.
any one can help me out to write this program
following my c code i got 6 errors:
#include<16f877.h>
#fuse HS,NOWDT, XT
#use delay (clock =4000000)
#use rs232(baud=9600.xmit=PIN_C6,rcv=PIN_C7,errors)
#zero_ram
///////// Variable Definition
char c=0xla;
int=b;
/////////// Interrupt Service Routen (ISR)
#int_EXT
EXT_isr()
{
bisable_interrupts(INT_EXT);
delay_ms(10);
printf ("AT+SMGS=\"+447889165758\"\r\n");
delay_ms(100);
printf (" THeft\r\n");
delay_ms(1000);
printf ('%c',c);
delay_ms(50);
output_a(0x00);
}
/////////Main function
void main()
{
set_tris_e(0x00);
output_e(0xff);
delay_ms(3000);
printf('AT+CMGI=2,1,0,0,1\R\N");
delay_ms(3000)
enable_interrupts(GLOABLE);
enable_interrupt(INT_EXT);
ext_int_edge(H_TO_L);
while (1)
{
b=input_b();
if (b==0x01)
{
delay_ms(50);
printf ("AT+CMGS=\+447889165758\"\r\n");
delay_ms(100);
printf ("Fire\r\n");
delay_ms(1000);
printf ('%c",c)
delay_ms(50);reset_cpu();
}View attachment 61773
I want help to write C code for my project about Wireless home security system
i got problem to write C code for pic16F877
im used mplab with CCSc complier.
any one can help me out to write this program
following my c code i got 6 errors:
#include<16f877.h>
#fuse HS,NOWDT, XT
#use delay (clock =4000000)
#use rs232(baud=9600.xmit=PIN_C6,rcv=PIN_C7,errors)
#zero_ram
///////// Variable Definition
char c=0xla;
int=b;
/////////// Interrupt Service Routen (ISR)
#int_EXT
EXT_isr()
{
bisable_interrupts(INT_EXT);
delay_ms(10);
printf ("AT+SMGS=\"+447889165758\"\r\n");
delay_ms(100);
printf (" THeft\r\n");
delay_ms(1000);
printf ('%c',c);
delay_ms(50);
output_a(0x00);
}
/////////Main function
void main()
{
set_tris_e(0x00);
output_e(0xff);
delay_ms(3000);
printf('AT+CMGI=2,1,0,0,1\R\N");
delay_ms(3000)
enable_interrupts(GLOABLE);
enable_interrupt(INT_EXT);
ext_int_edge(H_TO_L);
while (1)
{
b=input_b();
if (b==0x01)
{
delay_ms(50);
printf ("AT+CMGS=\+447889165758\"\r\n");
delay_ms(100);
printf ("Fire\r\n");
delay_ms(1000);
printf ('%c",c)
delay_ms(50);reset_cpu();
}View attachment 61773