Pic18f4680 Sink current

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Soren
Posts: 12
Joined: Tue Jun 09, 2009 4:17 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Pic18f4680 Sink current

Postby Soren » Wed Feb 17, 2016 4:36 pm

Hello

How can i get the output pin on the pic to sink current?

Best regard
Soren

User avatar
Benj
Matrix Staff
Posts: 14142
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4329 times
Been thanked: 4075 times
Contact:

Re: Pic18f4680 Sink current

Postby Benj » Wed Feb 17, 2016 4:44 pm

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.

Soren
Posts: 12
Joined: Tue Jun 09, 2009 4:17 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Pic18f4680 Sink current

Postby Soren » Wed Feb 17, 2016 4:51 pm

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

User avatar
Benj
Matrix Staff
Posts: 14142
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4329 times
Been thanked: 4075 times
Contact:

Re: Pic18f4680 Sink current

Postby Benj » Wed Feb 17, 2016 5:01 pm

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.

Soren
Posts: 12
Joined: Tue Jun 09, 2009 4:17 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Pic18f4680 Sink current

Postby Soren » Wed Feb 17, 2016 5:21 pm

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

Soren
Posts: 12
Joined: Tue Jun 09, 2009 4:17 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Pic18f4680 Sink current

Postby Soren » Fri Feb 19, 2016 5:22 pm

Hello Benj

I've got it figured out, my mistake. Surprise :D

Best regard
Soren
These users thanked the author Soren for the post:
Benj (Sat Feb 20, 2016 12:50 am)
Rating: 5.56%