USB CDC Communications for Dummies!


Closed Thread
Results 1 to 40 of 105

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    There we go. That one must be #3

    What to do if i get "overwriting previous address content" error message? (mister_e)
    http://www.picbasic.co.uk/forum/show...75&postcount=5
    DT

  2. #2
    Join Date
    Dec 2008
    Posts
    48

    Default

    Awesome!! That was number 3! Still with the OSC define statement, but will put that in for completeness sake! All works. Will post a detailed 'my experience' in a few.

  3. #3
    Join Date
    Dec 2008
    Posts
    48

    Default On An 18F2550

    Okay.... I got this puppy working with a bit of help from Darrel through the posts that lead up to this.

    Attached is the MPLAB project file and supporting files. The biggest stickler has been getting the configurations correct for the oscillator selection. So the rule going forward for my projects is to comment out the configuration statements in the PBP devicexxxxx.inc files and declare them in the program.

    Enjoy! Will be looking at this often as now I am moving onto inputs and other device profiles.... hopefully!
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2009
    Posts
    6

    Default

    I know to look out for all of the above and im very careful with setting configs on any 18 series device as there is a lot to them, however none of the above is my problem.

    I cannot even get a confirmed working hex file to work without the dredded "Unknown Device" error, with EXACT hardware even.

    Ive tried many different cables, ports, PC's etc. to no avail.

    I always use .47uF caps on VUSB, as I have a hundreds of them.

    Im about done with trying to get USB working and just continue on with the FTDI solution.

  5. #5
    Join Date
    Dec 2008
    Posts
    48

    Default

    Are you getting it to recognize the device when you initially plug into your computer?

    This is the most straightforward and easiest to run so far. It is based on SquibbCake's code in the first posting.

    Arnie >> What was your code supposed to do? When I thought I got it working (which it does for the most part), it was blowing a bunch of "B" and special characters across the screen. But upon closer review of your code, it looks like it is looking for user input, then sending data out on USART TX pins. Can you tell us how it is supposed to function and include a link to a similar schematic?
    Attached Files Attached Files

  6. #6
    Join Date
    Dec 2008
    Posts
    48

    Default

    I have gone throught the microchip document fairly thoroughly but have a few questions about some of the PicBasic Pro commands. In the USBIN and USBOUT functions, the first argument is endpoint. What is this referring to? How is that number determined?

  7. #7
    Join Date
    Aug 2005
    Posts
    57

    Default

    The code is a test program and actually works with a VB6 interface and yes it is looking for commands.The usart output was initially just to let me know the code was running.You can have serial data simultaneously on the pc's comport and the virtual comport(usb).From a terminal program send MX8 to start the usb xmit and MX9 to stop.If you want the VB code http://www.picbasic.co.uk/forum/show....php?t=7372.If you think the CDC demo was fun,Hid is even better.

Similar Threads

  1. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  2. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  3. USB CDC help..
    By jchandir in forum USB
    Replies: 6
    Last Post: - 22nd November 2008, 21:23
  4. Replies: 4
    Last Post: - 5th November 2008, 16:21
  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 : 2

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