Code and config fuses will help![]()
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
Thank You!!
Adding both
UCON var byte EXT
UCFG var byte EXT
to PIC18EXT.BAS
and adding
UCFG.3=1
UCON.3=0
to the code lets PortC.4 and PortC.5 on the 18F2455 operate as inputs.
Now i can sleep tonight!!!!!!!!!!!!!
RD
Actually UCON=0 at power up, so you shouldn't need that line... but who knows... it's never a bad idea to set all registers.
Good night![]()
Last edited by mister_e; - 7th April 2008 at 01:41.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Couldn't go to bed before i hooked up the pulse inputs.
When i hook up the pulse input to PortC.5 i get pulses on PortC.5 and not on PortC.4.
When i hook up the pulse input to PortC.4 i get counts on PortC.4 and PortC.5 as well.
The traces are paralell for awhile but if i was getting cross talk between traces i would think it would be in both directions. But its not. I can eliminate everything in the program that refers to PortC.4, put pulses into PortC.4 and still get pulses on PortC.5. There are no shorts between the traces or anything else on the board. It appears to be internal to the ports.
I did notice that these two ports do not have smitt triggers as most other inputs do. Can this have some thing to do with it.
Also there are internal pullups on these two inputs. I supposedly disabled them by setting UCFG.4 to 0 as well.
My pulse input is from a hall effect switch with a 1K pull up resistor.
Any thoughts????
RD
Weird... work perfectly here with 10K external pull-up (EasyPIC 4) but push-buttons... big deal... While i'm still awake, could you post your code so i can test it here?
Maybe not a bad idea to start a new thread as it's a out of topic from the original.
PS: for your tests.. did you left one or the other pin floating or you had a pull-up attach to?
Last edited by mister_e; - 7th April 2008 at 05:26.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks