Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB interfacing

Status
Not open for further replies.

blue6x

New Member
Good day...

I am planning to use the USB port for interfacing my project, instead of the printer port. I hope anyone could help me to that. I plan to use visual basic.

internet links to the reference site is highly appreciated.
thank you very much....
 
The only simple way is to use a USB/Serial converter, you can either buy them ready built, or buy just the chip - in either case it appears as a serial port on your computer, and has a serial output to your circuit.

Otherwise check options like the USB enabled 18F series PIC's, there are examples in the datasheets!.
 
nigel, does it mean, i have to use a separate programming just to use the usb port...

is it possible that i use Visual Basic to program so as to accept data from the usb port?

thanks.
 
What he is saying is; Programming to USB is a pain in the ass, requires totally different coding alltogether.
If you are new to programming, and this is only an assumption by the fact that you are using visual basics; Then i would suggest doing it the way nigel suggested and that is use a usb-Serial converter.
This way you can still use the usb port, but your programming it like it was Serial .
And to do this you would use the VB HT window(i think from memory).
unfortunaty because its classified as Serial it wont be plug and play, etc.
 
the main reason why i want to use the usb port is to assume the fact that usb port is a plug and play, well in that suggestion, i guess I might not get one of my objective.....
 
blue6x said:
the main reason why i want to use the usb port is to assume the fact that usb port is a plug and play, well in that suggestion, i guess I might not get one of my objective.....

USB isn't 'magically' plug and play, you have to write the code to make it so, and USB is really VERY complicated!.
 
if you're willing to go past asm and use a high level lang, then usb can be your friend

easyhid is an awesome plug-in for proton basic, it lets you interface with a PIC uc not as a serial device but on an event level... HID = human interface device. coolest thing about hid are the drivers are pretty much universal, mac, linux, windows 98 and beyond, no disk required ... unlike serial emulation which most likely requires a driver

of course, serial device emulation is an option, and the high level lang all have plug-ins to help you generate code.
 
The more complicated it gets, the more fun it can be. But only if you let it.
 
In all this, I could not see whether the OP is using a microcontroller or not. If there is no uC involved, then the answer is a very steep learning curve. If there is a microcontroller, you can use a serial interface and either the aforementioned usb/serial converter or a USB UART like the FTDI232R.

You might be able to use the FTDI232R's GPIO pins in some cases but you will need to spend some time studying the datasheet and experimenting.
 
As bbarney suggested.. Mecanqiue Easy HID is the simplest way to go. In conjunction with Melabs PICBASIC PRO or PROTON, many apps can be done in few minutes. Thanks to Mecanique to provide Easy HID for free.

Now if you want to learn all the USB stuff, i'll suggest you few reading hours/weeks/months with the Jan Axelson's book.
**broken link removed**
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top