Maker Pro
Maker Pro

Need PIC examlpe for usb

H

hello

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

Rex
 
H

hello

Jan 1, 1970
0
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.
 
J

John Fields

Jan 1, 1970
0
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.
 
M

Marc Reinig

Jan 1, 1970
0
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
 
G

Guest

Jan 1, 1970
0
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
 
R

Robert Monsen

Jan 1, 1970
0
hello said:
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
 
H

hello

Jan 1, 1970
0
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
 
H

hello

Jan 1, 1970
0
Robert Monsen said:
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.
 
H

hello

Jan 1, 1970
0
Robert Monsen said:
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
 
R

Robert Monsen

Jan 1, 1970
0
hello said:
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
 
R

Rick

Jan 1, 1970
0
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.
 
P

Peter Bennett

Jan 1, 1970
0
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.
 
H

hello

Jan 1, 1970
0
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 ?
 
P

Peter Bennett

Jan 1, 1970
0
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.
 
Top