Just remember that the next PBP upgrade will overwrite that file.
Keep track of what you've changed.
<br>
Just remember that the next PBP upgrade will overwrite that file.
Keep track of what you've changed.
<br>
DT
Cheers for your replies - much appreciated (as always!).
Kind Regards
Rob
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
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
Not using USB, just want to use them as digital inputs, for some flow sensors. Setting UCON = %00000000.
Code and config fuses will help![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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
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...The PBPPIC18 line should NOT be commented, and the PBPUSB18 line should be commented.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"
If you are using PBPL, then look in the 18F2455.BAL file instead.
hth,
DT
Bookmarks