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
Flowcode V3 PIC Output direction
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Flowcode V3 PIC Output direction
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
Looking at the V4 demo version, I don't see how this is accomplished. Anyone?
Thanks
Thanks
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Flowcode V3 PIC Output direction
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.
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.
Last edited by medelec35 on Fri Sep 17, 2010 5:55 am, edited 1 time in total.
Martin