Hi everyone... i'm connecting a mobile phone (SE T610) with a DB9 to RS232, meanwhile link to PIC16F877A. The purpose of the project is to dial the phone using AT command written in the PIC whenever the ultra or touch sensor triggered@ PIN_A0 or PIN_A1 triggered. However, i can't seems to have the output transmitted to the mobile phone, can anyone help please? thx...
Is the crystal oscillator @ PIN13 PIN14 of the PIC makes any differences? I'm using a 20MHz crystal series to 2 30pF capacitor.
Below is my program code:
//Preprocessor
#INCLUDE <16F877.H>
#FUSES HS,NOWDT,NOLVP
#USE DELAY(clock=12000000)
#USE RS232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#DEFINE OPEN PIN_A0
#DEFINE CLOSED PIN_A1
#DEFINE SIREN1 PIN_B5
#DEFINE LED PIN_B6
char SENSOR1, SENSOR2;
void MAIN()
{ SET_TRIS_A(0x3F);
SET_TRIS_B(0x01);
SET_TRIS_C(0x0E);
SET_TRIS_D(0x00);
SENSOR1=INPUT(OPEN);
SENSOR2=INPUT(CLOSED);
if(SENSOR1)
{
PRINTF("ATD0122121556;\n\r");
OUTPUT_HIGH(SIREN1);
}
else if(SENSOR2)
{
OUTPUT_HIGH(LED);
}
}
The connectivity of MAX232 to my PIC as showned
**broken link removed**
It would be great if anyone could brighten me up... Thx
Is the crystal oscillator @ PIN13 PIN14 of the PIC makes any differences? I'm using a 20MHz crystal series to 2 30pF capacitor.
Below is my program code:
//Preprocessor
#INCLUDE <16F877.H>
#FUSES HS,NOWDT,NOLVP
#USE DELAY(clock=12000000)
#USE RS232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#DEFINE OPEN PIN_A0
#DEFINE CLOSED PIN_A1
#DEFINE SIREN1 PIN_B5
#DEFINE LED PIN_B6
char SENSOR1, SENSOR2;
void MAIN()
{ SET_TRIS_A(0x3F);
SET_TRIS_B(0x01);
SET_TRIS_C(0x0E);
SET_TRIS_D(0x00);
SENSOR1=INPUT(OPEN);
SENSOR2=INPUT(CLOSED);
if(SENSOR1)
{
PRINTF("ATD0122121556;\n\r");
OUTPUT_HIGH(SIREN1);
}
else if(SENSOR2)
{
OUTPUT_HIGH(LED);
}
}
The connectivity of MAX232 to my PIC as showned
**broken link removed**
It would be great if anyone could brighten me up... Thx