5 Replies - 7367 Views - Last Post: 30 December 2010 - 09:35 AM Rate Topic: -----

#1 jcmantua  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-December 10

Accessing parallel ports and usb port using c

Posted 17 December 2010 - 02:39 PM

I need to know how to write data to(and read data from) the usb and serial com ports.

I am using Microsoft visual studio.net (2003).

I believe you can use C's standard fwrite and fread statements to do this. But you have to be able to open up a stream to these ports in order to make it happen.

Can you help me with this question?

JCMantua

MOD EDIT: Moved from C++ Tutorials

This post has been edited by JackOfAllTrades: 18 December 2010 - 06:59 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Accessing parallel ports and usb port using c

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6081
  • View blog
  • Posts: 23,556
  • Joined: 23-August 08

Re: Accessing parallel ports and usb port using c

Posted 18 December 2010 - 07:01 AM

Don't post questions as topics in the Tutorials forum; that's for submitting tutorials.
Was This Post Helpful? 0
  • +
  • -

#3 jimblumberg  Icon User is online

  • member icon


Reputation: 4148
  • View blog
  • Posts: 12,933
  • Joined: 25-December 09

Re: Accessing parallel ports and usb port using c

Posted 18 December 2010 - 08:12 AM

You could start by looking at these links:

Serial Port Central

Windows Serial ports

Reading a Serial Port using Windows


If you need more information then I Would suggest: Google. Once you have a program and need specific help then post the complete code in question and any error/warning messages, and the specific questions.

Jim

This post has been edited by jimblumberg: 18 December 2010 - 08:12 AM

Was This Post Helpful? 1
  • +
  • -

#4 oscode  Icon User is offline

  • D.I.C Regular

Reputation: 109
  • View blog
  • Posts: 257
  • Joined: 24-October 10

Re: Accessing parallel ports and usb port using c

Posted 21 December 2010 - 07:54 AM

Try googling libusb also.
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6081
  • View blog
  • Posts: 23,556
  • Joined: 23-August 08

Re: Accessing parallel ports and usb port using c

Posted 21 December 2010 - 12:34 PM

We also have an excellent tutorial on libusb.
Was This Post Helpful? 0
  • +
  • -

#6 horace  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 291
  • View blog
  • Posts: 1,900
  • Joined: 25-October 06

Re: Accessing parallel ports and usb port using c

Posted 30 December 2010 - 09:35 AM

View Postjcmantua, on 17 December 2010 - 08:39 PM, said:

I need to know how to write data to(and read data from) the usb and serial com ports.

I am using Microsoft visual studio.net (2003).

I believe you can use C's standard fwrite and fread statements to do this. But you have to be able to open up a stream to these ports in order to make it happen.

Can you help me with this question?

JCMantua

MOD EDIT: Moved from C++ Tutorials

if you need to communicate directly with the hardware IO ports have a look at
http://logix4u.net/L...2000/NT/XP.html
also worth looking at is
http://www.lvr.com/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1