Hi Srinil, MPLAB and C18 are used to program the PIC, to build a C program that will read data from a PC serial port you will need to use a C compiler for the PC. >From what you are saying I get that you have a GPS on COM2 and you want to pass some data from it to the PIC connected in COM1. You can program the PIC to read data from a serial port and then you need to write a program that will read data from COM2 and output it in COM1 in a format that the PIC will be able to understand. I would say that you should divide this in three parts: - reading data from GPS on COM2. - outputting data to COM1. - getting the PIC to read data from COM1. Then you just need to put it all together and it should work. Looking at the way you are asking this question it seems to me that you are just starting and trying to achieve this may just be a bit difficult, so dividing it into several tasks will let you learn a bit more and it will not be as frustrating. For the serial comms with the PIC look for it in the PICLIST and adapt the program to your needs. For the PC side try Google. http://www.piclist.com/techref/microchip/rs232.htm Hope it helps Best regards Luis -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of srinil@katuns.org Sent: 03 July 2007 12:54 To: piclist@mit.edu Subject: [PIC][EE]reading data from COM1 port of PC by PIC Hi, How I can read data from my PC COM1 port using MPLAB and C18(using C programming language) 1. is it possible to use inline assembly to read COM1 port using MPLAB, beacause i couldn't find any library function in MPLAB that used to read COM1 port of a PC 2.my virtual gps is conected to COM2(COM1 and COM2 connected using virtual serial port kit). regards srinil kumar -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist