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.

How to build a USB device ?

Status
Not open for further replies.

pkshima

Member
I have been wondering for long on how to use the USB port to interface my circuits with the computer.

Can someone point me to a place which shows how to build a simple USB device ?

I would like to use that knowledge to interface the remote control of my robot to the computer.

thanks in advance,
Pradeep
 
reply

You have to include more detail, some hardware programer's use usb and elec.
 
sorry i missed that.
what else would you like me to include.
i need to see a simple USB device.
maybe a circuit that converts the serial bits to parallel 8 bits ?
but could be anything. I need the basic idea.
 
pkshima said:
I have been wondering for long on how to use the USB port to interface my circuits with the computer.

Can someone point me to a place which shows how to build a simple USB device ?

USB isn't simple, it's probably 20 times more complicated than doing serial?. You basically have two options, either use a USB to serial converter chip (which is often used commercially), or use a micro-controller with USB facilities. MicroChip have a number of PIC's which are USB capable, including some new FLASH ones - they also provide various technical bulletins on how to use them - but it isn't simple!.
 
thanks a lot for your replies :D

Can I hack something out of old USB mice/keyboard etc. and use it to add USB capability to my project. maybe some chip/IC which I can just desolder out from there or use the whole of the circuit lying in there.
 
pkshima said:
thanks a lot for your replies :D

Can I hack something out of old USB mice/keyboard etc. and use it to add USB capability to my project. maybe some chip/IC which I can just desolder out from there or use the whole of the circuit lying in there.

I wouldn't have thought so! - for a start it's only one way (mouse to PC), and it will have a pre-programmed micro-controller inside the mouse, so you could only use it to read similar sensors to those used in the mouse.

As already suggested by myself and others, your easiest solution (by FAR!) is to use a USB to serial converter - either a chip (which are freely available, but surface mount), or an external adaptor for a PC, which again are freely available, and quite cheap.
 
hmmm great :)
I agree. though I would go for a USB to parallel interface
to be able to interface it with the dtmf generator chip TP5089.
But then I wonder I can as well go directly with the parallel port
already present on the computer :?
with the USB, the oly benefit would be free power, which I guess is
pure 5V :?:
 
pkshima said:
hmmm great :)
I agree. though I would go for a USB to parallel interface
to be able to interface it with the dtmf generator chip TP5089.
But then I wonder I can as well go directly with the parallel port
already present on the computer :?
with the USB, the oly benefit would be free power, which I guess is
pure 5V :?:

Yes, USB has a 5V supply included on the connector, although the current is limited.

Don't you have a serial port on your computer?, serial is very easy to do, and you can always add an external USB/serial converter to use it on a USB only machine?.
 
Nigel Goodwin said:
Don't you have a serial port on your computer?, serial is very easy to do, and you can always add an external USB/serial converter to use it on a USB only machine?.

I do Nigel but then how would I interface the TP5089(DTMF generator chip)
to use the serial data ? The chip has 4 row and 4 column pins. So I need a way to convert the serial data from the serial port to 8 parallel bits.
Is there an easy way to do that ? Is MAX232 all I need.

Can anyone point me to a place where I can find out how to convert serial data from RS232 port to parallel data. without using a microcontroller cos I dont want that part to become the most complex part of the project and costly too.
 
pkshima said:
Nigel Goodwin said:
Don't you have a serial port on your computer?, serial is very easy to do, and you can always add an external USB/serial converter to use it on a USB only machine?.

I do Nigel but then how would I interface the TP5089(DTMF generator chip)
to use the serial data ? The chip has 4 row and 4 column pins. So I need a way to convert the serial data from the serial port to 8 parallel bits.
Is there an easy way to do that ? Is MAX232 all I need.

Can anyone point me to a place where I can find out how to convert serial data from RS232 port to parallel data. without using a microcontroller cos I dont want that part to become the most complex part of the project and costly too.

Using a micro-controller is the obvious way, and it's low cost!, PIC's cost very little! - a MAX232 is simply a level converter, it converts from the +12V/-12V of RS232 to 0V/5V of TTL (both ways).
 
hmmm I see. So which one would you suggest ?
 
pkshima said:
hmmm I see. So which one would you suggest ?

It depends what you need?, the 16F628 is the one I choose for my tutorials, and is cheap and easy to use - although you can get ones with more internal hardware, but the 628 includes a hardware UART, which might be all you need?.

What exactly are you wanting to do?.
 
hmmm i want to convert serial data from RS232/USB port to parallel data(8 bits at a time).
 
pkshima said:
hmmm i want to convert serial data from RS232/USB port to parallel data(8 bits at a time).

That's trivial to do, one of my tutorials does just that.

However, that's not explaining what you want to do, only a small part of how you want to accomplish it. You've mentioned a tone generator IC, is the idea to generate DTMF tones from your computer?.

You also mention '4 rows' and '4 columns', how were you planning doing that with 8 TTL logic outputs?.
 
Yes Nigel, the idea is to generate DTMF tones using the computer.
I am presently doing that in software, taking the output from the soundcard and transmitting it to the robot using a FM TX.

But the downside of tha approach is that its non-conventional, slow and not handy cos you will always need a computer. you cant have buttons on the remote for hand held operation.

The TP5089 chip has 4 row pins and 4 col pins. so total 8 pins.
If I have 8 bit parallel data, I am done.
 
pkshima said:
The TP5089 chip has 4 row pins and 4 col pins. so total 8 pins.
If I have 8 bit parallel data, I am done.

NO!! - you have to connect a row to a column, without them being referenced to ground - how can you do that with 8 bit parallel data?.
 
Status
Not open for further replies.

Latest threads

Back
Top