Connect with us

Need PIC examlpe for usb

Discussion in 'Electronic Basics' started by hello, Sep 24, 2003.

Scroll to continue with content
  1. hello

    hello Guest

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

    Rex
     
  2. hello

    hello Guest

    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.
     
  3. John Fields

    John Fields Guest

     
  4. Marc Reinig

    Marc Reinig Guest

    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
     
  5. Guest

    Guest Guest

    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
     
  6. 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
     
  7. hello

    hello Guest

    You say that you need to connect a PIC16F84 to a PC via USB. You should
    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
     
  8. hello

    hello Guest

    If it's from Microchip I am willing to pay.
     
  9. hello

    hello Guest

    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
     
  10. 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
     
  11. Rick

    Rick Guest


    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.
     
  12. 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.
     
  13. hello

    hello Guest

    It should be quite easy to make the PIC talk to a PC RS-232 serial
    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 ?
     
  14. 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.
     
  15. Rick

    Rick Guest

    Check out http://www.ftdichip.com/

    They are good!

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

    for pre-built modules.

    Rick.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-