Hi there,
I have a PCB design (display) with 3 buttons.
We normally connect the PIC input-pin to ground with a resistor.
Than the button pulls up the input-pin to 5V when pressed.
In this design, the input-pins are high, connected to 5V.
When a button is pressed, the input-pin connects to ground.
In the flowcode program, I have made the buttons "Active low"
It are the buttons connected to C5, C6 and C7 input-pins.
When I test this in simulation, all seems to work well.
However, when in the PCB, the buttons are active and the software reacts.
Does anybody have tips on how to use these 'negative' buttons?
Please let me know, I'm getting stuck here.
The FC10 program that I'm testing with is included.
Inverted contacts
-
- Posts: 28
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 17, 2020 3:25 pm
- Location: Netherlands
- Been thanked: 2 times
Inverted contacts
- Attachments
-
- 4471 - CT200 Teller - 9079 TEST V02.fcfx
- (43.87 KiB) Downloaded 10 times
Best regards,
Rinie
Rinie
-
- Matrix Staff
- Posts: 1924
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Inverted contacts
I have moved you post as the Tips and Trick is only for sharing your tips and trick.
It's not for starting off with a question.
As for switches with a polarity of active low.
When the switch is not pressed, the switch input will be at VCC, the variable assigned to the switch should be inverse to the input pin = 0
When the switch is pressed the switch input will be at 0V, the variable assigned to the switch should be inverse to the input pin = 1
I have just checked on an arduino and it is indeed the case.
If I was you, I would measure the I/P and output in relation to 0V and check the logic is correct.
For the Flowchart you have a decision Iff:Test_DK = 1.
That will be true the the switch is pressed which will pull the input to 0V which will then be the True branch.
In turn that should cause LE_1000 to turn off then back on.
It's not for starting off with a question.
As for switches with a polarity of active low.
When the switch is not pressed, the switch input will be at VCC, the variable assigned to the switch should be inverse to the input pin = 0
When the switch is pressed the switch input will be at 0V, the variable assigned to the switch should be inverse to the input pin = 1
I have just checked on an arduino and it is indeed the case.
If I was you, I would measure the I/P and output in relation to 0V and check the logic is correct.
For the Flowchart you have a decision Iff:Test_DK = 1.
That will be true the the switch is pressed which will pull the input to 0V which will then be the True branch.
In turn that should cause LE_1000 to turn off then back on.
Martin