data transfer from port

E

Erik D

Hey,
Does anyone know if there is something in C that can read the data transfer
in the serial/paralel-port?
Or can't that be done with C?

THX, Erik
 
J

John Harrison

Erik D said:
Hey,
Does anyone know if there is something in C that can read the data transfer
in the serial/paralel-port?
Or can't that be done with C?

THX, Erik

Who knows this is a C++ group. Try I suspect that the
answer will be, 'It depends on your operating system' (pretty obvious
really), so why not try a group about whatever operating system you happen
to be using.

john
 
T

Thomas Matthews

Erik said:
Hey,
Does anyone know if there is something in C that can read the data transfer
in the serial/paralel-port?
Or can't that be done with C?

THX, Erik

Reading from the serial, parallel, USB, I2C, and Firewire ports can
be read from C and C++ with a little help from platform specific
functions.

Reading from the serial port could be as easy as:
char read_serial_port(void)
{
volatile char * Uart_rx_reg = (volatile char *)(0x43000);
return *Uart_rx_reg;
}

But then, it could be more complicated, especially if your
platform doesn't have a serial port.

By the way, some serial ports are different than the
parallel ports.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
D

Default User

Who knows this is a C++ group. Try I suspect that the
answer will be, 'It depends on your operating system' (pretty obvious
really), so why not try a group about whatever operating system you happen
to be using.


In fact, he already posted there and got pretty much that response.
Demonstrates an appalling lack of usenet skills, as he multiposted to
groups, posted in the wrong groups, did not lurk for the required time,
blah blah blah.




Brian Rodenborn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top