What do you have connected to your port pins (e.g., LEDs, floating, etc.)?
Have you tried something like this to test PORTC?
For X = 0 to 255
PORTC = X
Pause 500
NEXT X
Paul Borgmeier
Salt Lake City, Utah
USA
What do you have connected to your port pins (e.g., LEDs, floating, etc.)?
Have you tried something like this to test PORTC?
For X = 0 to 255
PORTC = X
Pause 500
NEXT X
Paul Borgmeier
Salt Lake City, Utah
USA
Last edited by paul borgmeier; - 29th May 2006 at 14:28.
That works. The problem is when you have all ports activated (porta, portb, portc), there are issues with only portc. Like I said before, all outputs work on portc by themselves but when combines with other outputs, portc.0 through portc.3 has problems. Any more suggestions? Can someone else try to activate all ports on a 16F870, 876, 876A and see if it works?
Thanks,
Chris
maybe you reach the maximum current source of your PIC. How about if you trade your LEDs to 1-10K resistors???
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The outputs are going to a ULN2003A and while I haven't measured it, the datasheet for the ULN2003A says it requires 1.2mA per pin.....this is well below the 200mA maximum by the PIC. The PIC is supplying roughly 19.2mA to activate the outputs.
Call me slow, but I still do not understand. My suggested code in post #6 does activate combined pins of PORTC. If that worked, then I would try this:Originally Posted by Christopher4187
PORTA = 255
pause 1000
PORTB = 255
pause
For X = 0 to 15
PORTC = X
Pause 100
NEXT X
Pause 10000
end
and see if it is still weird.
I was suspecting R-M-W issues as hinted in my subject line of post #6. Your code is full of R-M-W opportunity where the code above is not. If you still get weird results, you can rule out R-M-W issues. If your problem goes away, then it could be R-M-W.
My question about what you had connected was exactly where Steve went – possibly to much current but it seems you have ruled that out.
Paul Borgmeier
Salt Lake City, Utah
USA
Paul,
I have located something abnormal. I took off all of the ULN2003A's from the board and I can get all of the outputs activated at the same time. Maybe current is the issue but it will require further investigation to determine where the problem exactly is.
Thanks,
Chris
I have located the problem. On the ULN2003A (the one for PORTC), the negative pin was not soldered.....I must have overlooked it. When the ULN was trying to draw more current, it wasn't able to because of the high resistance between ground and the negative pin. Thanks to all who helped.
Chris
Bookmarks