Sam, I have tried this myself with VC++ and found it a bit of a nightmare. In = the end I opted for using VB ver 6, with the module MSCOMM. There are som= e very good examples. You could use one of the ONCOMM events to detect fo= r a TX. I managed to write my modest program in about 4 hrs after reading this. S= ome of the documentation is a bit hard to find but it its there. http://support.microsoft.com/support/kb/articles/Q262/8/83.ASP Regards Gary sam woolf wrote: > I'm having a bit of a nightmare doing serial port communication between= a computer and a 16f84. The pic is sending data at 19200 baud to the com= puter. I have been using a c program based on craig peacock's at www.beyo= ndlogic.org/serial/termpoll.c . But unfortunately I am losing significant= amounts of data. I think this is because the code needs to be interrupt = driven but I can't get the interrupt driven version (www.beyondlogic.org/= serial/buff1024.c )to work... My compiler does not like the weird pointer= -to-function or whatever it is stuff going on with the interrupt function= and I cant get my head around what its supposed to be doing either... I'= m using microsoft visual c++ 5.0 and have already had to make several adj= ustments such as changing all the inportb()s to _inp()s... does anyone kn= ow what I need to do to make this work, or does anyone have any simple to= understand and working microsoft visual c++ 5.0 code for doing interrupt= driven serial comms?? I know this is slightly off topic but I am at my w= its end!! > SW > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- Information in this communication and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. If you have received= this communication in error, please notify the sender immediately and the= n destroy any copies of it. There is no intention to create any legally binding contract or other commitment through the use of this email. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads