Page 1 of 1

Flowcode V3 PIC Output direction

Posted: Fri Aug 14, 2009 7:25 am
by mfun
Hello All,

I did search the forum and if I missed the answer to my question, then please forgive me... but here goes.
It appears that by default Flowcode V3 sets the output direction to source current (switch the "Pos" , while the "0V" is common.
Is it possible to sink current (switch the "0V", while the "Pos" is common?

Thanks in advance,
Mike

Re: Flowcode V3 PIC Output direction

Posted: Fri Aug 14, 2009 7:37 am
by Steve
Not in V3, but in Flowcode V4 you can set a switch to be active high or active low.

Re: Flowcode V3 PIC Output direction

Posted: Thu Sep 16, 2010 3:41 pm
by mfun
Looking at the V4 demo version, I don't see how this is accomplished. Anyone?
Thanks

Re: Flowcode V3 PIC Output direction

Posted: Thu Sep 16, 2010 5:31 pm
by medelec35
Hello Mike.
To set orientation of switch, you can do the following:
1) Make sure you can see the Simulation Panel which can be enabled from View Menu (Panel should be ticked)
2) Select Switch from the 'Inputs' Icon, this cause a switch icon to appear on the simulation panel.

3) Right click on the switch and select properties.
A separate properties window for the switch component will appear.

4) Click the three dots next to 'External properties' You can now select Active high or active low

To select a pin for switch to be connected to, Click on the three dots next to 'Connections'. Select Port and Pin form drop down boxes
Hope this is helps.
As for Sourcing and sinking: Microcontrollers can source and sink 25mA per Pin up to a maxim total of 200mA. Suppose you Have a LED and a resistor is series. If you connect the anode side to + supply and cathode side to the target pin, then when pin = + 5V or o/p is high, then no current will flow, as anode and cathode are at the same potential . If o/p is Low or 0V, then you are sinking, and LED will be on.

Conversely If you connect anode side to target pin, and cathode side to 0V, then when o/p is high or 5V, then you are sourcing, so LED is on. When o/p = low or 0V then no current will flow, since anode and cathode are at the same potential.

Re: Flowcode V3 PIC Output direction

Posted: Fri Sep 17, 2010 4:19 am
by mfun
Thank you, medelec35.