USB on 18F27J53. Closer but still struggling with this.


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: USB on 18F27J53. Closer but still struggling with this.

    aaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhaaaaaaaaa a (refer to this video for the real voice ) seems you're right! Datasheet pdf page 535, table 31-10, parameter 1A

    So 48MHz crystal will not work. End of the story
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: USB on 18F27J53. Closer but still struggling with this.

    It currently has a 48M crystal (as HS and HSPLL) and it's working great - driving LCD.
    Tried 4M and 20M.
    Don't have 8, 12, 16 ~ time to expand my clock selection.
    Schematic and code when I get a break.

  3. #3
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: USB on 18F27J53. Closer but still struggling with this.

    Tried 4MHz again with same results: Everything else OK but no USB.

    Schematic ~ PIC is wired: 4M on OSC; VUSB cap to gnd; USB on D+, D-; R/C on MCLR.
    Plus LCD (forget which pins) which works great.
    Oh, plus debug on pin13, works too.

    Tried with and without VB GUI running.
    Code is untouched from EasyHID Wizard (because there is sign of a helpful 'Put something here'), although I have changed OSC speed:

    ' ************************************************** **********
    ' * Auto generated EasyHID file. PBP 2.60 and above *
    ' ************************************************** **********

    ' include the HID descriptor
    include "DESCUSBProject.bas"

    DEFINE OSC 4
    DEFINE LOADER_USED 1

    USBBufferSizeMax con 8 ' maximum buffer size
    USBBufferSizeTX con 8 ' input
    USBBufferSizeRX con 8 ' output

    ' the USB buffer...
    USBBuffer Var Byte[USBBufferSizeMax]
    USBBufferCount Var Byte

    ' ************************************************** **********
    ' * main program loop - remember, you must keep the USB *
    ' * connection alive with a call to USBService every couple *
    ' * of milliseconds or so... *
    ' ************************************************** **********
    usbinit ' initialise USB...
    ProgramStart:
    gosub DoUSBIn
    gosub DoUSBOut
    goto ProgramStart

    ' ************************************************** **********
    ' * receive data from the USB bus *
    ' ************************************************** **********
    DoUSBIn:
    USBBufferCount = USBBufferSizeRX ' RX buffer size
    USBService ' keep connection alive
    USBIn 1, USBBuffer, USBBufferCount, DoUSBIn ' read data, if available
    return

    ' ************************************************** **********
    ' * wait for USB interface to attach *
    ' ************************************************** **********
    DoUSBOut:
    USBBufferCount = USBBufferSizeTX ' TX buffer size
    USBService ' keep connection alive
    USBOut 1, USBBuffer, USBBufferCount, DoUSBOut ' if bus available, transmit data
    return

    Windows responds: 'No driver files required or have been loaded for this device'
    Last edited by kenif; - 10th August 2011 at 06:51.

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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