473,668 Members | 2,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

interfacing a serial device

dev
hi
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon

Sep 16 '06 #1
6 2392
On 16 Sep 2006 07:55:00 -0700, "dev" <va************ @gmail.comwrote
in comp.lang.c:
hi
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon
The C language does not define an interface to any hardware devices at
all, because the language itself is completely platform independent
but hardware devices, and how you access them, are 100% dependent on
both the hardware and the operating system.

You need to ask about this in a newsgroup that supports programming
for your platform, or one specific to your compiler.

Taking a guess from the headers on your post, I would think that
news:comp.os.ms-windows.program mer.win32 is the group that you want.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 16 '06 #2
dev wrote:
hi
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon
Even if it were topical here (what it is not) you do not
say which machine you use, what "serial port" means (RS 232 ???)
which operating system, etc etc.

It is impossible in principle to know what you want.

Sep 16 '06 #3
In article <11************ *********@i3g20 00cwc.googlegro ups.com>,
dev <va************ @gmail.comwrote :
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon
Others have (correctly) pointed you to other newsgroups.

If you are looking for an example, then I suggest reading the C-Kermit
source. The Windows version of Kermit is proprietary but the
unified code for all the other versions is readily downloadable.

--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
Sep 16 '06 #4

"dev" <va************ @gmail.comwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
hi
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon
PC serial port page and code:
http://my.execpc.com/CE/AC/geezer/osd/serial/

Google/Yahoo search should help you find many similar pages. Search for
something like this, replace 16650 with the chip you want:

+"serial port" +uart +code +16650
Rod Pemberton
Sep 18 '06 #5
dev

windows platform and i want to access lpt port for controlling a motion
device ex:car(toy)

Sep 20 '06 #6
dev wrote:
>
windows platform and i want to access lpt port for controlling a
motion device ex:car(toy)
All of this is off-topic here, I guess. You didn't include any quotes
so it's a bit hard to say. As you can't do what you ask in ISO standard
C, you need to find a newsgroup dedicated to your platform.


Brian
Sep 20 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2676
by: | last post by:
Hi, Do memory sticks have serial numbers like harddrives? If so how can I get this, I want to uniquely identify a memory stick (removable drive) for authentication. Thanks
4
1861
by: Shaurya Anand | last post by:
I would like to know more about Interfacing hardware devices through .NET. We're students and what we're trying to do is control our robots with printer or serial port interfacing... very similar to C++ classic style. Please help us as it could do great wonders for our project.
4
11187
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. What I would like to do is make the serial port accessible via a web service. The web service and the legacy application would be running on the same machine. The mobile application would access the web service via a network connection. It...
4
11046
by: Lonifasiko | last post by:
Hi, I've been able to communicate using HyperTerminal with my device via serial port COM1. I just send a command and device switches on. I just need that to start playing with it. This way, I understand device and serial communication work wihout problems. Now I want to do the same with C# code. As simple as that. I open the serial port with the configuration manufacturer gives me,
3
11598
by: naveen.sabapathy | last post by:
Hi, I am trying to use virtual serial ports to develop/test my serial communication program. Running in to trouble... I am using com0com to create the virtual ports. The virtual ports seem to be working fine when I test it with Hyperterminal . I am using the example program that comes with pyserial, as below. --------------- import serial
2
7021
by: Paul Sijben | last post by:
To automate/ease configuration in my app I am trying to find out to which serial port a certain bluetooth device is connected. With pybluez I can find out which bluetooth devices I have, but it will not tell me the serial port they are mapped to. Is there a way to figure this out from python? (I am insterested in the platforms WinXP and linux primarily) Paul Sijben
5
5620
by: kkadrese | last post by:
hello group, how to get ttyS0 serial port for exclusive access? I have a python script that uses this device with AT commands. I need that two instances can call simultaneosuly this python script but only one of them gets the device. I tried fcntl.flock, it was just ignored, put writtable file LCK..ttyS0 in /var/lock, tried ioctl (but I may not know what are appropriate arguments), googled half a day for various phrases, error messages...
6
6652
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send '%' to serial port and make sure it reached the serial port. 2. Once confirmed, send another character.
6
4637
by: brianrpsgt1 | last post by:
I am new to scripting. I am trying to read the settings from a serial device using Python. I have been able to successfully connect to the device and change baud rate settings, ect... with PySerial. I am trying to send a command to the serial device and capture the returned info, however, it is not working. Code is below: import serial import time s = serial.Serial(port=1, timeout=None, baudrate=9600)
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8382
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.