1. 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.
    Dismiss Notice

PIC 18F4550 interacing with USB

Discussion in 'Microcontrollers' started by amax, Dec 19, 2007.

  1. amax

    amax New Member

    Joined:
    Dec 19, 2007
    Messages:
    4
    Likes:
    0
    Location:
    India
    Hello,
    I am doing a project on USB interfacing. i want to Interface PC uSB port with PIC18F4550 to control various electronic device.
    i need to control only the output ports of PIC18F4550 by genrating commands from PC.That is if i want to control Stepper motor then step and direction pulse for controlling stepper motor will be applied from PC by coding in C/C++/VC++ or any other languages.it may be controlled by some GUI or some key event from keyboard.
    so,i need USB driver for this IC and how can i send the commands to this driver for controlling eletronic devices?
    And Do i need any programmer circuit for this IC?if yes then from where i can get software for that?if i want to make my own programmer circuit then how can i make ?

    With Thanks And Regards.
    amax
     
  2. ClydeCrashKop

    ClydeCrashKop Well-Known Member

    Joined:
    Apr 28, 2005
    Messages:
    1,017
    Likes:
    171
    Location:
    Florida
    Search the Microchip website for the “PICDEM FS USB DEMO BOARD” that uses that chip. You can download a schematic and software for that board. The demo software will let you program the chip with your HEX file. They used Borland C for the PC end of the demo but I was able to find a Visual C++ translation of it on their Microchip forum. If you don’t find all you need say so, I will look up numbers and links for you.
     
  3. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You may also want to look at the UBW USB Wacker project.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. tboydva

    tboydva New Member

    Joined:
    Apr 16, 2007
    Messages:
    42
    Likes:
    0
    Location:
    Arlington, VA

    If you want to concentrate on "engineering" the PC-side of your application, you may want to look into a pre-configured MC device. I've used both of these:

    http://www.phidgets.com/index.php
    http://www.dlpdesign.com/usb/io8.shtml

    These allow you to write your PC code to a "standard" interface (COM ports or APIs)....
     
  6. amax

    amax New Member

    Joined:
    Dec 19, 2007
    Messages:
    4
    Likes:
    0
    Location:
    India
    Thanks for your reply.
    But what do you mean by pre-configured MC? how this pre configured MC will differ from the API programs? i need to build my own interfacing circut.i have seen tthe link http://www.phidgets.com/index.php.
    but,i need to develop my own hardware.and they do'nt provide any internal circuitary.i could not found which interfacing ICs has been used.

    As you told,i have to work with preconfigured MC,how can i Pre-configure it.what is circuit and software for that?

    Thanks And Regards,
    amax.
     
    Last edited: Dec 19, 2007
  7. tboydva

    tboydva New Member

    Joined:
    Apr 16, 2007
    Messages:
    42
    Likes:
    0
    Location:
    Arlington, VA
    Sorry to be cryptic. What I'm saying is that you can either obtain the discrete components, get your microcontroller (MC), design the firmware (i.e. code for the microcontroller including the USB communication), program it, debug it, and make sure your components work the way they should. Then, you will need to program the PC-side of it... Personally, I use MCs when the project is strictly embedded (i.e. it works w/out PC control or input). For sending digital signals directly from a PC to a device, I like the DLP or Phidget devices as the firmware is already on the "board" and the peripheral devices are available to rapidly interface to a PC. I have C# code blocks to perform serial communications (DLP) and am on the way to having classes that implement the Phidget APIs. So, if for instance you want to control a motor from your PC, you could buy a Phidget with the motor board(s), write several lines of code on your PC and be on your way (vice the first part of this message). Hey, I do this stuff as necessary to keep laboratory instruments running and to (ultimately) save time. Although I'd love to devote more time to it, quick and easy is the way I usually go!
     
  8. amax

    amax New Member

    Joined:
    Dec 19, 2007
    Messages:
    4
    Likes:
    0
    Location:
    India
    Hello,
    thanks for giving me suggetions.but i can't follow that way.
    well,can you tell me what is the maximum data transfer rate that can be handled by 4550.

    With Thanks And Regards,
    amax.
     
  9. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Based on this question (the answer is yes) you've never programmed a PIC or possibly any other micro before. USB can be pretty tricky and you're going to have to learn some programming before you'll get it to work. There is a USB HID generator for the 18F4550 called EasyHID that may make things a little easier. There are free USB stacks like Microchips and others or you can purchase a HID maker for the 18F4550 for $599
    http://www20.inetba.com/tracesystemsinc/usb_tools.ivnu
    Or
    You might want to explore the FT245R IC (USB to parallel)
    http://www.ftdichip.com/Products/FT245R.htm
     
    Last edited: Dec 21, 2007

Share This Page