PIC18EXT.BAS Alteration


Closed Thread
Results 1 to 21 of 21

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Just remember that the next PBP upgrade will overwrite that file.

    Keep track of what you've changed.
    <br>
    DT

  2. #2
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94


    Did you find this post helpful? Yes | No

    Talking Thanks!

    Cheers for your replies - much appreciated (as always!).

    Kind Regards

    Rob

  3. #3
    Join Date
    Apr 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default 18F2455 PortC.4 & 5 as input

    I added the definition of UCON to the PIC18EXT.BAS file. Which eliminates the compile error. But the PortC.4 and 5 when read with either a high or low applied read zero. What else do i need to do to use these ports as input.

    RD

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


    Did you find this post helpful? Yes | No

    Default

    Adding UCON implies that you are using USB.

    PORTC.4, PORTC.5 are the USB D+/D- pins, so you won't be able to use them as digital I/O at the same time as USB.
    <br>
    DT

  5. #5
    Join Date
    Apr 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Digital inputs

    Not using USB, just want to use them as digital inputs, for some flow sensors. Setting UCON = %00000000.

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


    Did you find this post helpful? Yes | No

    Default

    Code and config fuses will help
    Steve

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

  7. #7
    Join Date
    Apr 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Config Settings for non-USB

    The only config setting i see that affects USB is VREGEN. Does this have to be off for the USB to be disabled. From what i read in the data sheet only UCON.3 needs to be turned off to change PortC.4 & 5 to digital.

    I am using Micro Code Studios boot loader, do you know if they preset bits in the config to enable USB?

    RD

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


    Did you find this post helpful? Yes | No

    Default

    If you were getting compile errors regarding UCON, then the USB library is probably being included without you realizing it. Your program most likely compiles to a size that seems much larger than it should.

    If the file you are compiling is in the same folder as another USB project, then the USB library may be included automatically.

    Or if the 18F2455.bas in the PBP folder has been modified for USB it will do the same thing from any folder.

    If it is in the same folder as another USB project? Move it to it's own separate folder.

    If it's already in it's own folder? Check the 18F2455.bas file in the PBP folder. You should see this in the file...
    Code:
    BANKA   $0000, $005F
    BANK0   $0060, $00FF
    BANK1   $0100, $01FF
    BANK2   $0200, $02FF
    BANK3   $0300, $03FF
    BANK4   $0400, $04FF
    BANK5   $0500, $05FF
    BANK6   $0600, $06FF
    BANK7   $0700, $07FF
    'EEPROM  $F00000, $F000FF
    LIBRARY "PBPPIC18"
    'LIBRARY "PBPUSB18"
    The PBPPIC18 line should NOT be commented, and the PBPUSB18 line should be commented.

    If you are using PBPL, then look in the 18F2455.BAL file instead.

    hth,
    DT

Similar Threads

  1. Elapsed_Int-18 Alteration
    By Rob in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2008, 11:51

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