Page 1 of 1

Button emulation relative to ports

Posted: Wed Feb 09, 2022 4:02 am
by Osta
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?

Re: Button emulation relative to ports

Posted: Sat Feb 12, 2022 10:50 pm
by chipfryer27
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

Re: Button emulation relative to ports

Posted: Sat Feb 26, 2022 8:53 am
by Osta
I mean the dynamic polling of the buttons, as well as working with sensors that require polarity reversal and combined switching of other devices.

Re: Button emulation relative to ports

Posted: Fri Mar 04, 2022 12:01 pm
by BenR
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.
Image

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.

Re: Button emulation relative to ports

Posted: Tue Jul 05, 2022 2:47 pm
by Osta
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.