Hey, everybody!
I have the task of putting buttons between the ports.
But in the emulator all the buttons work relative to ground,
Do you know if it is possible to simulate buttons in relation to ports?
Button emulation relative to ports
-
- Posts: 53
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 1:12 pm
- Has thanked: 1 time
- Been thanked: 3 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Button emulation relative to ports
Hi
Not sure if I understand your request correctly. Do you wish to connect a button for example between Port A0 and B0 or such like?
If so, how will the ports detect any change in voltage? Will you initially make Port A0 "high" and try and detect a "high" on Port B0? If so you could just set B0 to be "active high". Ports can be set to be active High or Low.
Sorry if I've misunderstood your request.
Regards
Not sure if I understand your request correctly. Do you wish to connect a button for example between Port A0 and B0 or such like?
If so, how will the ports detect any change in voltage? Will you initially make Port A0 "high" and try and detect a "high" on Port B0? If so you could just set B0 to be "active high". Ports can be set to be active High or Low.
Sorry if I've misunderstood your request.
Regards
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: Button emulation relative to ports
Hello,
Possible yes, but you might need to create a component to allow you to do it, as you say the current built in components work to pull to the voltage rails VCC and VSS.
We can maybe help with creating a simple component but how would the switch work, i.e. when open would there be a pull to a third pin or to a voltage rail. when closed would there be a strong pull to a second pin or to a voltage rail?
The diagram here might help.

There is a weak pull when open and a strong pull when closed both would likely need to be defined. You could maybe get away from the need to use a third IO pin for the open (default) state if your MCU device has internal pull up and pull down resistors you can enable.
A simple schematic of what you are doing might help.
Possible yes, but you might need to create a component to allow you to do it, as you say the current built in components work to pull to the voltage rails VCC and VSS.
We can maybe help with creating a simple component but how would the switch work, i.e. when open would there be a pull to a third pin or to a voltage rail. when closed would there be a strong pull to a second pin or to a voltage rail?
The diagram here might help.

There is a weak pull when open and a strong pull when closed both would likely need to be defined. You could maybe get away from the need to use a third IO pin for the open (default) state if your MCU device has internal pull up and pull down resistors you can enable.
A simple schematic of what you are doing might help.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Button emulation relative to ports
Hi!!!
Sorry for the long silence - I was away.
This is for 8X8 keyboard. Moreover, the keyboard ports will switch to polling mode
at a certain time. The RX prot will be pulled up to the VSS by external resistors and the TX port
for the duration of the poll will go into the OUT state.
Sorry for the long silence - I was away.
This is for 8X8 keyboard. Moreover, the keyboard ports will switch to polling mode
at a certain time. The RX prot will be pulled up to the VSS by external resistors and the TX port
for the duration of the poll will go into the OUT state.