adcon1=$0F
is one of the setting that will work...
datasheet ....
adcon1=$0F
is one of the setting that will work...
datasheet ....
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Now I would like to disable the USB-controller of this pic, because I don't need this feature and I have to use the input pins RC4 and RC5.
I've read the datasheet and I can disable USB by setting bit3 (USBEN) of the UCON register to zero. The problem is that it looks that PBP doesn't know the commands I want to use. I think i have to use assembly. I tried the following, but I get a warning.
Warning:Code:ASM MOVLW 0h MOVWF UCON ENDASM
Found opcode in collumn 1. (MOVLW)
Found opcode in collumn 1. (MOVWF)
I think my assembly knowledge is very bad
Reason is that there's no UCON register definition in the PIC18EXT.bas file
look at the end and add it like this
hey!!! don't place the comment to the rightCode:TXREG2 VAR BYTE EXT TXSTA VAR BYTE EXT TXSTA1 VAR BYTE EXT TXSTA2 VAR BYTE EXT UCON VAR BYTE EXT <= here VELRH VAR BYTE EXT VELRL VAR BYTE EXT WDTCON VAR BYTE EXT WREG VAR BYTE EXT![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Steve,
I also need to add UCON and UCFG for a PIC 18F4550. Adding the variables in the file mentionned above corrects the undefined error at compile time, but how do those variables get linked with the proper registers?
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Ruben,
Unless I am mistaken, the USB module is disabled by default. That's why I need to turn it on for USB processing. If you need to use pins C4-5 as IO, you should not have any problems doing so.
Or did I read the datasheet backwards?
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
I think I found a clue from Steve about where the variable would get linked to the actual register:
http://www.picbasic.co.uk/forum/show...75&postcount=5
Now I have to find the right file to edit and the right address.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks