I am trying to read SMS using serial communication. But my serial communication shows an error. If I send three, or more than three bits to serial it receives only the three letters for the first time, then stops receiving further. Then I have to reset the controller to receive further. But its ok if I am sending characters one by one.
I am using CCS compiler for programming. Please help me in clearing this problem.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Jan 26, 2011 8:50 pm
To fix your problem:
Use an interrupt-driven serial receive buffer. Call the bkbhit() function
to see if characters are available in the buffer. Then call bgetc() to get
the characters. Also add ERRORS to your #use rs232() statement.
See the following CCS example file which shows how to do this:
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