CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USART read problem in PIC16F877A

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mahadev



Joined: 05 Jan 2012
Posts: 2

View user's profile Send private message Send e-mail

USART read problem in PIC16F877A
PostPosted: Thu Jan 05, 2012 10:37 pm     Reply with quote

Hi,

I am using the PIC16F877A with GSM module (SIM900A) & want to read the SMS through USART. I am able to send the sms but not able to read it.
1. How to use the interrupt to read the GSM module response?
2. what care is required for interrupt of RS232 receiver?

Please, any one can share the c source code of it.

Thanks,
Mahadev
temtronic



Joined: 01 Jul 2010
Posts: 9163
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 06, 2012 6:50 am     Reply with quote

Consult the ex_sisr.c example program in the examples folder that CCS kindly supplies. It shows you a working example of using 'circular buffers' for receiving serial communications.

Also be sure to add the option 'errors' to the USE RS232(....) declaration.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Sun Jan 08, 2012 1:51 pm     Reply with quote

To get detailed help -
post your COMPILER Version
and the code in question - using only KBHIT as a detector of code means you are really only polling the USART - and if net program delay takes more than TWO character receive intervals - you will for sure lose RX chars.

Be sure to check the example isr code too.

BTW - from my experience - the 16f887 is a FAR better chip with better USART support from CCS than the 877 and at A MUCH LOWER price from any legit distributor on this planet -- it just slays me to see so many requests about the old 877 ...... Shocked Shocked Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group