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

Rceiving A Packet of Data..RS232..Help

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



Joined: 16 Dec 2005
Posts: 22

View user's profile Send private message

Rceiving A Packet of Data..RS232..Help
PostPosted: Fri Dec 23, 2005 9:14 pm     Reply with quote

hi to everyone,

i'm definitely a pic beginner and i am having a problem on receiving a packet of data (about 20 bytes long). i have to wait for a start byte (e.g. 01H) to determine if data is being sent from a host. im using rs232 library. i do not know how to receive the packet of data through the RCV pin of the PIC16F84A. any idea? or sample codes? thank you very much..

-=alDin=-

Embarassed
John Morley



Joined: 09 Aug 2004
Posts: 97

View user's profile Send private message

PostPosted: Sat Dec 24, 2005 11:50 am     Reply with quote

Hi,

Any particular reason you are using the 16F84A? I ask because it does not have a built in UART for receiving serial data. It can be done with that part, but your life will be lots easier if you switch to something like the 16F628A which is pin-compatible with the F84. With the built in UART you can use a serial interrupt (look at #INT_RDA in the manual), and fill a buffer with the incoming data. Once the entire packet has been received, your main program acts on it! Lot's of examples in the archives, BTW!

John
_________________
John Morley
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