Need PIC examlpe for usb

H

hello

Guest
I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex
 
www.dlpdesign.com

hello wrote:

I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex
 
I need to connect a PIC16F84 to a pc interface so that I can
give it instructions from the pc. I want to use the usb port.

Here are the issues I need to solve:

How do I connect a usb cable to a pcb
How do I send data with a pc
How do I receive data with the PIC

Needless to say, the solution must be
- free (except for parts) , as it is an educational exercise
- the software needs to be explained/documented for
the same reason.
 
On Wed, 24 Sep 2003 11:25:38 +0100, "hello" <~~~~~~> wrote:

I need to connect a PIC16F84 to a pc interface so that I can
give it instructions from the pc. I want to use the usb port.

Here are the issues I need to solve:

How do I connect a usb cable to a pcb
How do I send data with a pc
How do I receive data with the PIC

Needless to say, the solution must be
- free (except for parts) , as it is an educational exercise
- the software needs to be explained/documented for
the same reason.
---
http://www.usb.org/developers/devclass_docs/usbdi10.pdf
--
John Fields
 
Three exellent books on USB are:
"USB Design by Example", John Hyde, Intel Press
"USB Complete" Jan Axelson, Lakeview Research
"Universal Serial Bus System Architecture", Don Anderson, MindShare

The first two are excellent general USB references with lots of good
implementation examples. The third is an excellent detailed reference on
how USB works but is very thin on implementation examples

Marc Reinig
System Solutions

"hello" <~~~~~~> wrote in message news:bkrrea029g5@enews2.newsguy.com...
I need to connect a PIC16F84 to a pc interface so that I can
give it instructions from the pc. I want to use the usb port.

Here are the issues I need to solve:

How do I connect a usb cable to a pcb
How do I send data with a pc
How do I receive data with the PIC

Needless to say, the solution must be
- free (except for parts) , as it is an educational exercise
- the software needs to be explained/documented for
the same reason.
 
In article <bkrrea029g5@enews2.newsguy.com>, "hello" <~~~~~~> says...
I need to connect a PIC16F84 to a pc interface so that I can
give it instructions from the pc. I want to use the usb port.
You say that you need to connect a PIC16F84 to a PC via USB. You should
know that this will be more than running a few wires from the '84 to the
PC.

USB is not as simple as, say, the PS2 keyboard interface. If you wish to
use the USB port, you will need to make the device that contains the
PIC16F84 into a USB device.

This can be done in many ways - you should make the effort of learning
much more about USB. This should be part of your "educational exercise".
Take a look at http://www.lvr.com for a lot of USB information. Or use a
pre-built device as an intermediary: http://www.usbmicro.com.

HTH
 
"hello" <~~~~~~> wrote in message news:bkqjb30oud@enews3.newsguy.com...
I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex
Actually, the PIC16C745 has support for USB. The MicroChip PICkit(tm) FLASH
STARTER KIT uses one for programming PIC flash chips. The surrounding
circuitry looks relatively straightforward, consisting of a few simple
discrete elements (I'm staring at one right now.) I'm guessing that
microchip has more information on this in their datasheet, possibly
including some design examples. They may even have a development kit (but
not for free, I'm afraid.)

Regards,
Bob Monsen
 
You say that you need to connect a PIC16F84 to a PC via USB. You should
know that this will be more than running a few wires from the '84 to the
PC.

USB is not as simple as, say, the PS2 keyboard interface. If you wish to
use the USB port, you will need to make the device that contains the
PIC16F84 into a USB device.
I was thinking in my mind of rs232, i.e. I was thinking I can use the
ports of the PIC controller to send/receive
data. If that's what you mean by 'making the device into a usb device' then yes
this is what I want to do. It seems it is rather complex so I might just give it
a miss. Is it difficult even if I only want to use it as an on/off switch, i.e. no need
for high speed data transfer? Anyway, thanks to all the repliers for all the
ideas and all the links. Thanks.
Rex
 
"Robert Monsen" <postmaster@BulkingPro.com> wrote in message news:gpocb.145296$mp.72195@rwcrnsc51.ops.asp.att.net...
"hello" <~~~~~~> wrote in message news:bkqjb30oud@enews3.newsguy.com...
I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex



Actually, the PIC16C745 has support for USB. The MicroChip PICkit(tm) FLASH
STARTER KIT uses one for programming PIC flash chips. The surrounding
circuitry looks relatively straightforward, consisting of a few simple
discrete elements (I'm staring at one right now.) I'm guessing that
microchip has more information on this in their datasheet, possibly
including some design examples. They may even have a development kit (but
not for free, I'm afraid.)
If it's from Microchip I am willing to pay.

Regards,
Bob Monsen
 
"Robert Monsen" <postmaster@BulkingPro.com> wrote in message news:gpocb.145296$mp.72195@rwcrnsc51.ops.asp.att.net...
"hello" <~~~~~~> wrote in message news:bkqjb30oud@enews3.newsguy.com...
I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex



Actually, the PIC16C745 has support for USB. The MicroChip PICkit(tm) FLASH
STARTER KIT uses one for programming PIC flash chips. The surrounding
circuitry looks relatively straightforward, consisting of a few simple
discrete elements (I'm staring at one right now.) I'm guessing that
microchip has more information on this in their datasheet, possibly
including some design examples. They may even have a development kit (but
not for free, I'm afraid.)

Regards,
Bob Monsen
I have just had a look at pickit1 and you are right, the controller there
directly controlls the USB.
Some problems to solve:
1. It seems there are some "supporting components", I can identify
several resistors, transistors, a diode, capacitors, an oscillator
2. It seems the usb itself is a 4 pin socket
3. the PIC is as you said pic16c745 and we cannot use the pickit1
to program it, i.e. we shall need the more expensive one which btw
still runs on the parallel port interface :-(

Let me know if you find more information. Thanks.
Rex
 
"hello" <~~~~~~> wrote in message news:bkt6rl0p0v@enews2.newsguy.com...
"Robert Monsen" <postmaster@BulkingPro.com> wrote in message
news:gpocb.145296$mp.72195@rwcrnsc51.ops.asp.att.net...

"hello" <~~~~~~> wrote in message news:bkqjb30oud@enews3.newsguy.com...
I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex



Actually, the PIC16C745 has support for USB. The MicroChip PICkit(tm)
FLASH
STARTER KIT uses one for programming PIC flash chips. The surrounding
circuitry looks relatively straightforward, consisting of a few simple
discrete elements (I'm staring at one right now.) I'm guessing that
microchip has more information on this in their datasheet, possibly
including some design examples. They may even have a development kit
(but
not for free, I'm afraid.)

Regards,
Bob Monsen


I have just had a look at pickit1 and you are right, the controller there
directly controlls the USB.
Some problems to solve:
1. It seems there are some "supporting components", I can identify
several resistors, transistors, a diode, capacitors, an oscillator
2. It seems the usb itself is a 4 pin socket
3. the PIC is as you said pic16c745 and we cannot use the pickit1
to program it, i.e. we shall need the more expensive one which btw
still runs on the parallel port interface :-(

Let me know if you find more information. Thanks.
Look here:

http://www.microchip.com/1010/pline/picmicro/category/perictrl/14kbytes/devices/16c745/index.htm

The data sheet gives you all the information you need to do this. There is
also an application demonstrating a PS/2 to USB function, which might get
you 95% of the way to where you need to go. You can get the protocol stacks
there too.

One problem with this chip is that its not a flash reprogramable chip. With
such a complex system, it'll be hard to get it running without really good
simulation. Buy a few, or get alot of samples...

Also, I'm guessing there are alot of other options for uControllers with
USB. This one only supports USB 1.1

Regards,
Bob Monsen
 
On Wed, 24 Sep 2003 00:01:16 +0100, "hello" <~~~~~~> wrote:

I heard it is really difficult to interface to a pc usb port,
Does anyone know how to do it?

Rex

If you can use the PIC16C745 or 765 which has USB built-in, Elektor
Electronics magazine have a project based on it next month (out on
25th October) in the UK.

Rick.
 
On Wed, 24 Sep 2003 23:34:07 +0100, "hello" <~~~~~~> wrote:

I was thinking in my mind of rs232, i.e. I was thinking I can use the
ports of the PIC controller to send/receive
data. If that's what you mean by 'making the device into a usb device' then yes
this is what I want to do. It seems it is rather complex so I might just give it
a miss. Is it difficult even if I only want to use it as an on/off switch, i.e. no need
for high speed data transfer? Anyway, thanks to all the repliers for all the
ideas and all the links. Thanks.
Rex
Although USB does use serial communications, it is _much_ more complex
than, and completely incompatible with, RS-232.

It should be quite easy to make the PIC talk to a PC RS-232 serial
port. If your computer doesn't have a serial port, you can buy a USB
<-> RS-232 adaptor, and connect the PIC to that adaptor. The adaptor
may look like two connectors and a bit of wire, but there is some
complex electronics inside the RS-232 connector.








--
Peter Bennett VE7CEI
GPS and NMEA info and programs: http://vancouver-webpages.com/peter/index.html
Newsgroup new user info: http://vancouver-webpages.com/nnq
 
It should be quite easy to make the PIC talk to a PC RS-232 serial
port. If your computer doesn't have a serial port, you can buy a USB
-> RS-232 adaptor, and connect the PIC to that adaptor. The adaptor
may look like two connectors and a bit of wire, but there is some
complex electronics inside the RS-232 connector.

Do you mean there is an adaptor that would allow me to connect from
the pc usb port to a serial connector on my pcb with pic on board ?
Are they expensive? And do they come with pc drivers ?
 
On Fri, 26 Sep 2003 12:20:16 +0100, "hello" <~~~~~~> wrote:

It should be quite easy to make the PIC talk to a PC RS-232 serial
port. If your computer doesn't have a serial port, you can buy a USB
-> RS-232 adaptor, and connect the PIC to that adaptor. The adaptor
may look like two connectors and a bit of wire, but there is some
complex electronics inside the RS-232 connector.

Do you mean there is an adaptor that would allow me to connect from
the pc usb port to a serial connector on my pcb with pic on board ?
Are they expensive? And do they come with pc drivers ?
Yes - these adaptors do exist (and I've seen a USB=>parallel port
adaptor too). You may find them at Radio Shack and other computer
dealers. There is one shown at http://pfranc.com/usb/usb.shtml for
about $30.



--
Peter Bennett VE7CEI
GPS and NMEA info and programs: http://vancouver-webpages.com/peter/index.html
Newsgroup new user info: http://vancouver-webpages.com/nnq
 
On Fri, 26 Sep 2003 12:20:16 +0100, "hello" <~~~~~~> wrote:

It should be quite easy to make the PIC talk to a PC RS-232 serial
port. If your computer doesn't have a serial port, you can buy a USB
-> RS-232 adaptor, and connect the PIC to that adaptor. The adaptor
may look like two connectors and a bit of wire, but there is some
complex electronics inside the RS-232 connector.

Do you mean there is an adaptor that would allow me to connect from
the pc usb port to a serial connector on my pcb with pic on board ?
Are they expensive? And do they come with pc drivers ?
Check out http://www.ftdichip.com/

They are good!

Also check http://www.dontronics.com/usb_232.html

for pre-built modules.

Rick.
 

Welcome to EDABoard.com

Sponsor

Back
Top