USB CDC Communications for Dummies!


Closed Thread
Results 1 to 40 of 105

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Australia
    Posts
    10

    Default USB Device Not Recognised

    G'Day,
    Used Mecanique cct(20M 18F4550) and PBP2.6 and after adding

    @ __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @ __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
    and then enabling VREGEN config bit got the Windows USB Device Not recogised message.
    Are there any other config bits that have to be changed.
    Is it possible to get a hex file for this project so I can at lest check my cct.
    tks

  2. #2
    Join Date
    Nov 2009
    Location
    Australia
    Posts
    10

    Smile All Fixed

    G'day (again)
    My problem cured when I added a 10MFD cap on the two 18F4550 power pins.
    I was using the USB 5v to power the card.
    So can now start playing(at last) with USB.
    Grant

  3. #3

    Default nearly there...

    Windows sees a pic18 usb cdc device s inserted, but finds no drivers.

    windows 7 32 bit

  4. #4

    Default

    yes the above error was me stupidly not showing windows device mangler where the right .inf file was, my bad...

    But..

    I am now doing a ' USBIN endpoint, buffer, count, nodatatloop ' every second or so, problem is when I send data to it, I only get it one byte at a time, so reading 'cat' takes 3 seconds......

    count variable is always 1 if data present, so i get 1 three times then it returns to zero

    surely I should get all 3 bytes into my buffer and a value returned of 3 for count.

    I dont lose any chars from my text string in the terminal, i think it buffers and does some form of flow control, but when i copy a text file in a dos/command window, i do lose them, i get a count of one for the first 'C' but then a zero as 'at' have got lost before i got a chance to read them.

  5. #5

    Default

    Ok cant edit the above but it goes like this, if i send 'cat' with hyperterminal or putty i get 3 individual chars at the pic end so need to read 3 times, if i send it from a program written in vb6, i get a 'cat' in one loop/poll etc and a bytecount length of 3, as expected, hope no one else falls foul of this.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    For anyone using this with WIN7 64 bit here is the *.inf driver file.
    Remove the .txt
    Attached Files Attached Files
    Dave
    Always wear safety glasses while programming.

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