Hello
How can i get the output pin on the pic to sink current?
Best regard
Soren
Pic18f4680 Sink current
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pic18f4680 Sink current
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pic18f4680 Sink current
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Pic18f4680 Sink current
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
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