Hi guys,
Can you explain this one If i use the switches macro and connect it to say port A, then add leds component you can connect that to port A also, when you run the prog it works?
Like :-
Variable = "Key"
begin
Loop while 1
Switches macro - using wait while low
decision box ( if Key>0)
Branch
output "Key"
end loop
end
Have i found a glitch or not
- goldwingers
- Posts: 118
- Joined: Wed Sep 06, 2006 1:22 pm
- Location: London
- Been thanked: 1 time
- Contact:
- 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:
Hello Goldwingers
The Digital I/O ports were designed as tri state input / output logic. Flowcode takes this into account and makes sure that the Tris registers stay up to date. Eg when reading from the switch the port is configured as an input. When writing to LEDs the port is configured as an output.
The Digital I/O ports were designed as tri state input / output logic. Flowcode takes this into account and makes sure that the Tris registers stay up to date. Eg when reading from the switch the port is configured as an input. When writing to LEDs the port is configured as an output.
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
- goldwingers
- Posts: 118
- Joined: Wed Sep 06, 2006 1:22 pm
- Location: London
- Been thanked: 1 time
- Contact:
Hmmm
Ok, so going back to my original observation, I can now assume that the resultant circuit was an LED in series with a switch (to ground) and a tee point to the Input of the pic. Once the switch was depressed the LED would come on.. irrespectively that the chip was seemingly there or not.
So am i right in assuming that the software is written around the V2 board switch methodology, with the resistor chain hence making a tri state circuit.
So am i right in assuming that the software is written around the V2 board switch methodology, with the resistor chain hence making a tri state circuit.
- 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:
Thats right the Input Output pins assigned by Flowcode are designed for use with our Dev boards and E-block range of hardware. You are also correct that when the pin is configured as an input that when a switch is pressed the LED also switches on. However if the pin is configured as an output the led will not light unless there is a logical 1 in the port register for the pin.
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