Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 26th, 2007, 12:26 AM   #1
diyora
Newbie
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 diyora is on a distinguished road
How to get data on USB port using programming in C

Hi,
I done programming in turbo C. I get data on parallet port successfully.I control stepper motor through it. Now i want to get data on USB port & then control stepper motor.So anyone can tell me how can i do programming for that?

Thanks in advance.

Regards,
diyora
diyora is offline   Reply With Quote
Old Nov 26th, 2007, 12:53 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: How to get data on USB port using programming in C

USB is a serial port. Without individually controlled switching signals. You'll need to learn about it and write a driver, or buy one.

If you're talking about old, 16-bit Turbo C, I'd suggest you upgrade compilers. It'll cost you every bit of zero dollars unless you're talking about working with little-known systems.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 26th, 2007, 3:25 AM   #3
diyora
Newbie
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 diyora is on a distinguished road
Re: How to get data on USB port using programming in C

Hi DaWei,
Thanks for reply & suggestion. Actully i am EC student.I am not to much aware of C language.Can you tell me what is the basic requiredment of driver? If you have any driver than tell me the basic idea of that.
As i doing in parallel port & serial port communication, i write port address of that port & i get data on that. is it possible in USB port?
From device manager i get address of parallel & serial port. For USB port their is memory range given.So can i do using that?

Thanks & regards,
diyora
diyora is offline   Reply With Quote
Old Nov 26th, 2007, 6:48 AM   #4
Salem
Programmer
 
Join Date: Nov 2007
Posts: 33
Rep Power: 0 Salem is on a distinguished road
Re: How to get data on USB port using programming in C

http://www.lvr.com/usb.htm
http://www.lvr.com/parport.htm
Yes, getting a compiler which is more in tune with your OS would be a start.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Salem is offline   Reply With Quote
Old Nov 26th, 2007, 8:44 AM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,076
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Re: How to get data on USB port using programming in C

Wow, this is so weird. I clicked on Salem's link to the parallel port, and it mentioned IEEE standards for interfacing with the port. A lot of the work I've recently been doing has been for the Standards department in the IEEE organization. It's just really cool to see that.

Anyways. *poof*
Sane is offline   Reply With Quote
Old Nov 29th, 2007, 9:15 PM   #6
Harakim
Hobbyist Programmer
 
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3 Harakim is on a distinguished road
Re: How to get data on USB port using programming in C

This site has a lot of links to various usb papers. Of the most interest to you would be the official specification (the first link.) The specification (usb_20.pdf) is about 570 pages and there are a few dozen megs of supplements that come with it.
Harakim is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data logging problem from the serial port jerryleo Perl 0 Jan 10th, 2006 8:47 AM
Agricultural Data Systems programming job offer faheja Paid Job Offers 2 Dec 28th, 2005 8:38 AM
Program related to Printer Port Programming post shadowhunter C++ 9 Apr 6th, 2005 8:04 PM
port programming dominic C++ 1 Feb 14th, 2005 11:52 AM
Beginner programming parellel port in C++ Velvet_leopard C++ 0 Feb 3rd, 2005 1:41 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC