PIC18F14K50 USB Not Working


+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    692

    Default PIC18F14K50 USB Not Working

    Okay, it looks like I'm stuck with the 18F4550 for my USB projects. Nothing else seems to work for me. I'm trying to just compile this program with the Include "descript.bas", but it doesn't work. This descript file works just fine with the 18F4550. I checked the USB_DEV.ASM and USB_HID.ASM files, but I don't know what the problem is. It might be an easy fix, but this assembler language is not my best friend. Any help is appreciated. Thanks, Robert

    Name:  Compile-Error-02.png
Views: 91
Size:  21.4 KB

    Code:
    Include	"descript.bas"	' Include the USB & HID descriptors
    
    Define  OSC  16
    OSCCON = %11110111
    
    #CONFIG
        CONFIG  CPUDIV = NOCLKDIV     ; No CPU System Clock divide
        CONFIG  USBDIV = OFF          ; USB clock comes directly from the OSC1/OSC2 oscillator block; no divide
        CONFIG  FOSC = IRC            ; Internal RC oscillator             ??????
        CONFIG  PLLEN = ON            ; Oscillator multiplied by 4
        CONFIG  PCLKEN = ON           ; Primary clock enabled
        CONFIG  FCMEN = OFF           ; Fail-Safe Clock Monitor disabled
        CONFIG  IESO = OFF            ; Oscillator Switchover mode disabled
        CONFIG  PWRTEN = OFF          ; PWRT disabled
        CONFIG  BOREN = OFF           ; Brown-out Reset disabled in hardware and software
        CONFIG  BORV = 19             ; VBOR set to 1.9 V nominal
        CONFIG  WDTEN = OFF           ; WDT is controlled by SWDTEN bit of the WDTCON register
        CONFIG  WDTPS = 512           ; 1:512
        CONFIG  HFOFST = OFF          ; The system clock is held off until the HFINTOSC is stable.
        CONFIG  MCLRE = OFF           ; RA3 input pin enabled; MCLR disabled
        CONFIG  STVREN = OFF          ; Stack full/underflow will not cause Reset
        CONFIG  LVP = OFF             ; Single-Supply ICSP disabled
        CONFIG  BBSIZ = OFF           ; 512W boot block size
        CONFIG  XINST = OFF           ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
        CONFIG  DEBUG = OFF           ; Background debugger disabled, RA0 and RA1 configured as general purpose I/O pins
        CONFIG  CP0 = ON              ; Block 0 code-protected
        CONFIG  CP1 = ON              ; Block 1 code-protected
        CONFIG  CPB = OFF             ; Boot block not code-protected
        CONFIG  CPD = OFF             ; Data EEPROM not code-protected
        CONFIG  WRT0 = OFF            ; Block 0 not write-protected
        CONFIG  WRT1 = OFF            ; Block 1 not write-protected
        CONFIG  WRTC = OFF            ; Configuration registers not write-protected
        CONFIG  WRTB = OFF            ; Boot block not write-protected
        CONFIG  WRTD = OFF            ; Data EEPROM not write-protected
        CONFIG  EBTR0 = OFF           ; Block 0 not protected from table reads executed in other blocks
        CONFIG  EBTR1 = OFF           ; Block 1 not protected from table reads executed in other blocks
        CONFIG  EBTRB = OFF           ; Boot block not protected from table reads executed in other blocks
    #ENDCONFIG
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,589

    Default Re: PIC18F14K50 USB Not Working

    Does that short piece of code (with different CONFIG of course) really compile for the 18F4550 but not for 18F14K50?

    There really isn't much actual code there is it?
    I see no USBINIT or anything so it might be that the USB libraries aren't included by PBP during compile time and therefor the variables that the assembler is looking for isn't being declared.

  3. #3
    Join Date
    Aug 2011
    Posts
    449

    Default Re: PIC18F14K50 USB Not Working

    +1

    What is "Include "descript.bas"?

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,057

    Default Re: PIC18F14K50 USB Not Working

    maybe he meant

    Include "hid_desc.bas" ?

    Ioannis

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    692

    Default Re: PIC18F14K50 USB Not Working

    Quote Originally Posted by HenrikOlsson View Post
    Does that short piece of code (with different CONFIG of course) really compile for the 18F4550 but not for 18F14K50?

    There really isn't much actual code there is it?
    I see no USBINIT or anything so it might be that the USB libraries aren't included by PBP during compile time and therefor the variables that the assembler is looking for isn't being declared.
    Yes, it compiles for the 18F4550 even without the config lines.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    692

    Default Re: PIC18F14K50 USB Not Working

    Quote Originally Posted by Ioannis View Post
    maybe he meant

    Include "hid_desc.bas" ?

    Ioannis
    Hmm, it works with the "hid_desc.bas" include. The descript.bas file is part of a HidMaker package that I bought before. Apparently, this descript file was made only for the 18F4550. Unfortunately, HidMaker went out of business. His owner Dr. Bob is not even responding to the emails. It is a shame to see a great program like HidMaker to close.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,057

    Default Re: PIC18F14K50 USB Not Working

    Maybe the syntax of the descript file is different than the one expected?

    Anyway it is a pity to see that company shutdown.

    People are getting old, retired or even die...

    Ioannis

  8. #8
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    692

    Default Re: PIC18F14K50 USB Not Working

    Quote Originally Posted by Ioannis View Post
    Maybe the syntax of the descript file is different than the one expected?

    Anyway it is a pity to see that company shutdown.

    People are getting old, retired or even die...

    Ioannis
    Also, PBP is getting less popular everyday. I'm going to have to dust off my C language skills again because I think that's what people are using the most today to program the PICs.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,057

    Default Re: PIC18F14K50 USB Not Working

    I hate to admit it but yeah, that is very true. We all should do that.

    But I also hate C...

    Ioannis

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,057

    Default Re: PIC18F14K50 USB Not Working

    I hate to admit it but yeah, that is very true. We all should do that.

    But I also hate C...

    Ioannis

  11. #11
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    692

    Default Re: PIC18F14K50 USB Not Working

    Quote Originally Posted by Ioannis View Post
    But I also hate C...
    Ioannis
    I'm not a big fan of C either.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Similar Threads

  1. PIC18F14K50 USB Keyboard firmware
    By ScumariTec in forum USB
    Replies: 0
    Last Post: - 27th January 2021, 11:29
  2. Pic18f14k50
    By JoeyWallice in forum mel PIC BASIC
    Replies: 2
    Last Post: - 23rd October 2012, 12:13
  3. Pic18f14k50
    By JoeyWallice in forum mel PIC BASIC
    Replies: 1
    Last Post: - 17th October 2012, 03:16
  4. USB with 20 pins anyone? PIC18F14K50 issues
    By ScaleRobotics in forum USB
    Replies: 6
    Last Post: - 17th July 2009, 16:39
  5. Replies: 6
    Last Post: - 5th November 2008, 12:30

Members who have read this thread : 11

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