Microcontroller › PIC › RECEIVER PROBLEM IN UART
- This topic has 8 replies, 6 voices, and was last updated 10 years, 10 months ago by
erwin.
-
AuthorPosts
-
March 29, 2013 at 1:05 pm #2212
Abinesh
ParticipantI am trting to transmit and receive character in pic.I can transmit character which i checked through hyperterminal but i cant receive character the thing is i cant properly set the receiver port. the interrrupt is not set while receiving.can any one help with me in this problem.
Thanks in advance.
April 2, 2013 at 4:24 pm #9413AJISH ALFRED
ParticipantHi Abinesh,
If you have trouble coding for the interrupt, then try ‘busy flag checking’ method. Please post your code which you have written so far.
February 20, 2014 at 5:39 am #11061Dhananjaya
Participantpleas help me…
i am also facing same problem … I have tested the code in pc hyperterminal for both send &Receive SMS through GSM SIM 300 with PIC 16F877a Micro controller through MAX 232 but when i connect GSm SIM 300 with PIC 16F877a Micro controller its not supporting so without connecting MAX 232 its working only for (I can transmit character) SEND ing Message and daling the call but its not receiving any thing..without using MAX 232 what is the problem…
February 20, 2014 at 9:13 am #11068Ashutosh Bhatt
Participantthere are two interrupts for UART
1) with transmit data
2) with receive data
both have to be saparately enabled or disabled.
one of the best way to test UART with computer is use LOOP BACK mode.
send character from hyperterminal and receive same from controller on hyper terminal screen.
February 21, 2014 at 8:17 am #11074Dhananjaya
ParticipantI have tested loop back mode for PIC microcontroller with PC hyperterminal is OK
how to check the receiving code …in PIC microcontroller with GSM SIM 300 with LCD
and then how to compare the receiving data..from predefined data
February 22, 2014 at 1:02 pm #11081Ashutosh Bhatt
Participantchecking of receive code is very simple
you will get ASCII characters for each letter or digit. like 0x31 for digit 1 0x41 for letter A like wise.
mostly you will get string of such ASCII characters from any device like GSM modem or GPS receiver.
so what you have to do is store this command in string – character type array
then just compare string using strcmp command in C language
February 22, 2014 at 1:59 pm #11083Dhananjaya
ParticipantDear Sir,
I have sending SMS through this i.e GSM SIM300 with PIC16F877A microcontroller I have tested the code for GSM SIM response like OK it will display on LCD i have written code like this
unsigned char i;
char buffer[25];
i=0;
while(!RCIF)
bufer[i++]=RCREG;
buffer=’