usb programming
-
thanks guys i feel that i'm getting close to solving this problem, i made this device on my own. It's a simple circuit which i wish to test. Using an ACD converter chip i intent to see the binary conversion in my VB program this information is transmitted via USB this way i dont have to use a microcontroller(c programming is troublesome). The binary conversion output pins are 8. Hmm i was so focused on using the USB port that i didnt look at how to send the 8 pins data through USB cable which has 4 pins (V+ D+ D- gnd).I bet theres someone out there who knows how to to it. IN future USB interfaced devices will be the standard thats y i'm doing it this way.
you're going to have to multiplex your data to send it serially. V+ and gnd are power, you cna't send data over them. D+ and D- are data but carry reversed sign copies of the same data. ie if D+ is +5v D- is -5v. The higher voltage differential reduces the affect of noise on the line.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
you're going to have to multiplex your data to send it serially. V+ and gnd are power, you cna't send data over them. D+ and D- are data but carry reversed sign copies of the same data. ie if D+ is +5v D- is -5v. The higher voltage differential reduces the affect of noise on the line.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
which multiplexing IC chip would u recommend I'm using ADC0804LCN. Theres also one more hurdle the VB program how to i program the code to receive data from the USB. Wow i didn know about the D+ D- function. I only know data travels through it
not a clue on the IC. For your VB app your choices are to either make your device look like an exising device to use it's driver or to write your own. Writing drivers is really hard. You need to use C++, use the DDK (very badly documented, little tutorial info available), and write kernal mode code (will crash your OS when it errors). If this is just a forfun project I'd strongly recomend getting a USB-RS232 dongle and implementing that (much simpler) interface.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
not a clue on the IC. For your VB app your choices are to either make your device look like an exising device to use it's driver or to write your own. Writing drivers is really hard. You need to use C++, use the DDK (very badly documented, little tutorial info available), and write kernal mode code (will crash your OS when it errors). If this is just a forfun project I'd strongly recomend getting a USB-RS232 dongle and implementing that (much simpler) interface.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
I've read about microcontrollers(i'm only familiar with PIC series and i'm not good at programming it) with USB engine(not certain) or USB support do u know of any such PIC's And whts a driver
There are several PIC microcontrollers that have USB functionality... also, almost all have serial (USART) so a USB-to-serial converter (that has previously been mentioned) would also work. 16C745, 18F2455 both have USB. Also... Most PICs have built-in A2D converters (the standard is 10 bit but some are 12 bit). I've also found this site that may help... http://www.alanmacek.com/usb/[^] Hope this helps.
Matthew Butler
-
I've read about microcontrollers(i'm only familiar with PIC series and i'm not good at programming it) with USB engine(not certain) or USB support do u know of any such PIC's And whts a driver
A driver is a piece of software that runs in the OS kernel and interfaces with it and the hardware device. IF you don't even know what one is you have no business trying to write one. Either find something else you can implement the hardware for or just fall back to RS232. Unlike USB it's a very dumb interface (60's vintage) and is controlled by just setting voltages on both ends.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
A driver is a piece of software that runs in the OS kernel and interfaces with it and the hardware device. IF you don't even know what one is you have no business trying to write one. Either find something else you can implement the hardware for or just fall back to RS232. Unlike USB it's a very dumb interface (60's vintage) and is controlled by just setting voltages on both ends.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
Thanks guys ur knowledge of this stuff is very useful. Well i done know anything about drivers, but i want my device to be usable when plucked into different computers USB port. Is that done with driver which part of the circuit would stores this information. Example like a USB keyboard u plug and play one part of the circuit or microcontroller stores this infromation(its the driver right). I'm assuming these from a logical point of view. I am sry if my driver questions are annoying, but i find it interesting. Which PIC would u recommend i use the PIC18 series or PIC16. theres also this red disc shaped thing(complier) do they share the same USB connection or different.
-
Thanks guys ur knowledge of this stuff is very useful. Well i done know anything about drivers, but i want my device to be usable when plucked into different computers USB port. Is that done with driver which part of the circuit would stores this information. Example like a USB keyboard u plug and play one part of the circuit or microcontroller stores this infromation(its the driver right). I'm assuming these from a logical point of view. I am sry if my driver questions are annoying, but i find it interesting. Which PIC would u recommend i use the PIC18 series or PIC16. theres also this red disc shaped thing(complier) do they share the same USB connection or different.
Hi, A driver is a program that communictes with the peripheral device (it isn't actually on the device, but on the computer). A plug and play device doesn't remember the computer it connects to... the computer remembers the device that has connected to it. (Usually peripheral devices don't have any memory). To send information through the USB port an a PC you will need to find a method of using an existing (default) driver that is 'pre-installed'... or finding a driver (a .dll or similar) that you can 'take along with the program'. Either way... Google will help. As for the PICs... I used to use the 16 series but after going to 18s, they are much more powerful... I would use these. The 'red disc shaped thing' is only a programmer (not a compiler)... It will probably say Microchip on it... This connects to your computer via USB and to the PIC via another method (not USB). Once you have programmed the PIC... you can completely disconnect the programmer... you no longer need this to run the program (if you didn't already know this). The PIC USB pins are seperate from the programming pins. You will need to read the datasheet of the PIC you choose to use... there will be examples on how to both connect and use the USB 'port'.
Matthew Butler
-
Hi, A driver is a program that communictes with the peripheral device (it isn't actually on the device, but on the computer). A plug and play device doesn't remember the computer it connects to... the computer remembers the device that has connected to it. (Usually peripheral devices don't have any memory). To send information through the USB port an a PC you will need to find a method of using an existing (default) driver that is 'pre-installed'... or finding a driver (a .dll or similar) that you can 'take along with the program'. Either way... Google will help. As for the PICs... I used to use the 16 series but after going to 18s, they are much more powerful... I would use these. The 'red disc shaped thing' is only a programmer (not a compiler)... It will probably say Microchip on it... This connects to your computer via USB and to the PIC via another method (not USB). Once you have programmed the PIC... you can completely disconnect the programmer... you no longer need this to run the program (if you didn't already know this). The PIC USB pins are seperate from the programming pins. You will need to read the datasheet of the PIC you choose to use... there will be examples on how to both connect and use the USB 'port'.
Matthew Butler
-
Thanks Matthew, that link u provided was very useful,do u know of any links which have example circuits using the PIC184550(are there any new versions )with the C code. I plan to use the PIC184550 chip(i think its the latest).
There are loads of example circuits about. Here's one (the 'Vusb' pin (connected to ground via a small capacitor) is important). http://www.electronics-lab.com/blog/wp-content/uploads/2007/10/schematic.gif[^] The PIC18F4550 is one of the newest versions in the 18 series (bearing in mind there are also PIC24, PIC30, PIC33 series). Look at section 17.0 in this[^] datasheet (for the PIC18F4552)... there is also a small circuit example and the relevent code to use the USB port. The PIC18F4550 is 'well known' so there is loads of examples (including C code) available after a few Google searches. (I prefer Assembler to C so I can't help with any sources). Hope this helps.
Matthew Butler
modified on Friday, March 14, 2008 12:29 PM
-
Hi guys, need ur help i have a circuit(ADC to BINARY) which i wish to communicate via USB port to a VB program to read data from( Example like a USB mouse which gives input and the cursor moves) I did some research and found out about virtual com ports which fools the program into thinking that the usb port is a com port but i'm not sure how to create one, do i need to do it this way or is there another way in which i could directly send data(binary) to the VB program
I came across this while looking for something else on the internet. It probably qualifies as that support kit containing a generic driver I mentioned in my earlier reply (I haven't looked into it in detail to see how you can use it with a self-built device). LibUSB-Win32[^] Judy