![]() |
|
#1
|
|||
|
|||
How to read from serial port in Chi, I want to know how can I read data through serial port in C using the Dev-C++ program ?
which libraries to use ? any hint may help , thanks.......... |
|||
|
#2
|
|||
|
|||
Re: How to read from serial port in CQuote:
Basically, under Windows, you open a serial port with the CreateFile Win32 API specifying the serial port in the args list of the function. The MSDN has a source example called mtty.c or something along those lines that is basically a Win32 terminal app. In C (and C++), you'll find that there are no "devices" handling capability outside of basic file I/O and (usually console) stream I/O. Accessing a USB device, talking to a tape drive, running a serial or parallel port, networking, etc. are all device interfaces provided by specific operating system implementations. In other words, you have to use whatever "services" your operating system exposes to you to gain access to "low-level" devices. :davis: |
|
#3
|
|||
|
|||
Re: How to read from serial port in CThanks for replying I saw an example in
www.boondog.com go to-->tutorials---->GPS and Serial Interfacing it uses some libraries to communicate with the serial port . I tried this example but I got so many errors . can anyone see this example and how to compile and run it? PLz help!!!!!!!!! |
|
#4
|
|||
|
|||
Re: How to read from serial port in CHi this is tirtho I have suffered from the same problem you have. I have some solution for it here is the code.
CPP / C++ / C Code:
If you have some problem regarding this program you can mail me I will help my best. This program is excellent for reading data of serial port. Better to use this program in DOS version C compiler. Last edited by admin : 25-Feb-2008 at 03:52.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Making a Program to Program | travis134 | C++ Forum | 1 | 09-Mar-2006 19:50 |
| Programming for serial port | Chucara | C++ Forum | 2 | 03-Nov-2005 04:18 |
| Serial port problem | chirayu | MS Visual C++ / MFC Forum | 0 | 07-Jul-2005 03:52 |
| Problem to read on a serial port | collinm | C Programming Language | 2 | 30-Mar-2005 01:42 |
| Problem with string and serial port | collinm | C Programming Language | 13 | 25-Mar-2005 07:39 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The