Page 1 of 1
Pic18f4680 Sink current
Posted: Wed Feb 17, 2016 4:36 pm
by Soren
Hello
How can i get the output pin on the pic to sink current?
Best regard
Soren
Re: Pic18f4680 Sink current
Posted: Wed Feb 17, 2016 4:44 pm
by Benj
Hello Soren,
Outputting 0 to a port pin will cause the pin to sink current.
Outputting 1 to a port pin will cause the pin to source current.
Re: Pic18f4680 Sink current
Posted: Wed Feb 17, 2016 4:51 pm
by Soren
Hello Benj
strange!
In flowcode when i place an output icon and outputting 0 to portA its not possible to get a LED with a resistor to light
Best regard
Soren
Re: Pic18f4680 Sink current
Posted: Wed Feb 17, 2016 5:01 pm
by Benj
Hello Soren,
I take it you have the LED anode connected to VDD/VCC and the Led cathode connected to the micro pin with a series resistor in there somewhere.
What value of resistor are you using? anything from 50 - 600 Ohms should work fine.
Is the LED damaged? They can easily be burnt out by over voltage or over current.
Re: Pic18f4680 Sink current
Posted: Wed Feb 17, 2016 5:21 pm
by Soren
Hello Benj
Yes, its because i try to run an LCD on port A, and the data-bit are internal pulled up,
if i measure on the data-bit are they always 5v even if i place an output icon last in program where i turn port A to 0.
i will make some experiments later today
Best regard
Soren
Re: Pic18f4680 Sink current
Posted: Fri Feb 19, 2016 5:22 pm
by Soren
Hello Benj
I've got it figured out, my mistake. Surprise
Best regard
Soren