USB Interface using PIC


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Sounds like what exactly after. Two questions then, what Compiler are you using and can you send these demos to me on email? I've sent you a PM with my email address.

    Many thanks,

    Steve

  2. #2
    OXIMBIT's Avatar
    OXIMBIT Guest


    Did you find this post helpful? Yes | No

    Default

    Steve I have sent you a PM with some example code.

    Tim

  3. #3


    Did you find this post helpful? Yes | No

    Default

    DOes any of you have a schematic of how to connect the PIC18F2455 to the usb?

  4. #4


    Did you find this post helpful? Yes | No

    Default

    And does somebody have a example prog that is realy for pbp FOR A pic18f2455

  5. #5
    OXIMBIT's Avatar
    OXIMBIT Guest


    Did you find this post helpful? Yes | No

    Default

    Have you tried looking in the manual?

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Yes i tried i try to compile the example code:

    USBCDC but can't get it work, i want to use a PIC2455.

    This is the PBP code:

    ' USB sample program for PIC18F4550 CDC serial port emulation

    ' Compilation of this program requires that specific support files be
    ' available in the source directory. You may also need to modify the
    ' file USBDESC.ASM so that the proper descriptor files are included. For
    ' detailed information, see the file PBP\USB18\USB.TXT.

    buffer Var Byte[16]
    cnt Var Byte

    LED Var PORTB.0


    Define OSC 48


    USBInit
    Low LED ' LED off

    ' Wait for USB input
    idleloop:
    USBService ' Must service USB regularly
    cnt = 16 ' Specify input buffer size
    USBIn 3, buffer, cnt, idleloop

    ' Message received
    Toggle LED

    buffer[0] = "H"
    buffer[1] = "e"
    buffer[2] = "l"
    buffer[3] = "l"
    buffer[4] = "o"
    buffer[5] = " "
    buffer[6] = "W"
    buffer[7] = "o"
    buffer[8] = "r"
    buffer[9] = "l"
    buffer[10] = "d"
    buffer[11] = 13
    buffer[12] = 10
    buffer[13] = 0

    outloop:
    USBService ' Must service USB regularly
    USBOut 3, buffer, 14, outloop

    Goto idleloop ' Wait for next buffer

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Getting further, the PBP goes compiling now only thany he asked for the MPASM compiler so i installed this compiler made the path settings.

    Then he start the MPASM only it gives the error.

    Error in parameter "18F4550"

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Reading a slave USB with a pic
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2008, 12:00
  3. Replies: 15
    Last Post: - 30th October 2007, 19:25
  4. USB bluetooth interface to PIC
    By naidab in forum Bluetooth
    Replies: 15
    Last Post: - 17th March 2007, 22:37
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts