|
-
Nov 25th, 2010, 02:46 AM
#1
Thread Starter
New Member
How to read and write data through USB
Hi all ,
I have a PCM 2707 USB to I2S converter module.... This is connected to the USB port of the PC... The other part i.e I2S part is given to the transmitter board...
So now i need to know , how i can send data to that IC through USB port???
And at the receiver end (its a wireless module) , i need to tap out the Data line and connect it to the USB port...
So at the receiver end how can i display the data collected , onto my PC through USB.....
Please do help me out...
Thank you
-
Nov 25th, 2010, 04:49 AM
#2
Re: How to read and write data through USB
What does Windows recognise the USB device as ?
-
Nov 25th, 2010, 04:52 AM
#3
Thread Starter
New Member
Re: How to read and write data through USB
 Originally Posted by Doogle
What does Windows recognise the USB device as ?
Hi ,
it recognizes itself as a Human interface device (HID)...
-
Nov 25th, 2010, 06:01 AM
#4
Re: How to read and write data through USB
What is the module configured to do ? All the examples I can find are to do with Audio Output (eg USB Headphones / Speakers)
-
Nov 26th, 2010, 12:34 PM
#5
Fanatic Member
Re: How to read and write data through USB
Are you sure this is the correct model number? The PCM 2707 USB is an Audio DAC with USB interface (it sould act like a sound card). I don't see anything that indicates that it provides a I2C interface. Internally, it has a SPI serial interface -- this is similar to I2C, but not the same thing, and I don't think it is designed to be used by the user.
There are other devices (http://www.robotshop.com/devantech-u...m_campaign=jos) for example, that provide a USB to 12C interface. In the case of the one that I've mentioned, you would use MSComm to send and receive data, because it employs a device driver that emulates a serial adapter.
Dick
Richard Grier, Consultant, Hard & Software
Microsoft MVP (Visual Basic)
-
Nov 29th, 2010, 02:06 AM
#6
Thread Starter
New Member
Re: How to read and write data through USB
 Originally Posted by Doogle
What is the module configured to do ? All the examples I can find are to do with Audio Output (eg USB Headphones / Speakers)
Module is configured as the factory out , takes USB input and lets out I2S.
-
Nov 29th, 2010, 04:17 AM
#7
Re: How to read and write data through USB
you need some SDK or similar from the manufacturer
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 29th, 2010, 12:46 PM
#8
Re: How to read and write data through USB
I think the O.P. means I²S, not I²C.
I agree, the manufacturer's drivers and docs from an SDK would be the way to go.
-
Nov 29th, 2010, 01:02 PM
#9
Fanatic Member
Re: How to read and write data through USB
Yeah, he did say I2S -- though this is about the same as I2C, with slight differences in protocol detail. However, since this is a HID device (and HID, normally, consists of mouse/keyboard IO, not sound card IO), it would seem that a vendor API is the way to go. I've seen other HID devices offer non-HID API's, though the ones that I've seen don't generally work under Windows Vista or Windows 7.
I suppose that one more suggestion might be to look in Control Panel to see if the USB adapter not only appears as a HID device, but also as a sound device. If so, then standard sound APIs might be used, such as PlaySound in winmm.dll. I'm sure that I've seen a wrapper for this dll, though I don't have a quick link.
Dick
Richard Grier, Consultant, Hard & Software
Microsoft MVP (Visual Basic)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|