Hi,
my doubt is rs232 flow control is possible in Pic 16f877A.
I don´t think there is hardware support for flow control. So you have to add it as software and use GPIO.
***
You have to decide a protocl on how you want to communicate.
* do you like to transmit binary data and commands (hard to read for debugging) or in ASCII style?
* do you want bytewise data transfer or blockwise?
An example:
PC --> uC: "R" ; R for Read complete EEPROM data
uC --> PC: 250 bytes of binary
(This method is simple to program, but you have about no chance to detect corrupt data or missing data, END of communicaton....)
or:
PC --> uC: "Read 12, 07 [CRC] [Cr] " ; Read, starting address 12 (decimal), 7 bytes, Checksum for validation, [Cr] to indicate End of command
uC --> PC: "EERead 12, 07 [CRC]" ; as header for the Pc, to describe the folowing data
uC --> PC: "EEData 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89 [CRC] [Cr]" 7 bytes of EEPROM data followed by CRC and end of comand
... or anything inbetween.
using binarydata is good if you want to transmit low byte count. But it is ahard to read.
using decimal (-> ASCII), hex (-> ASCII), or similar is easy to read, but needs more bytes to transmit.
Also you need to consider how to parse the incoming datastream on both sides.
Also, how to detect corrupt or missing data, and how to handle it (discard command or retry) how to detect a START or END of a command.
Baud rate...
Timeouts, and how to handle it.
Klaus