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=-
John Morley
Joined: 09 Aug 2004 Posts: 97
Posted: Sat Dec 24, 2005 11:50 am
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!
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