RFQ/BOM 0 Iniciar sesión / Registro

Selecciona tu ubicación

imagen de usuario

It is necessary to design a circuit that satisfies the LED and button sharing the IO port of an MCU. How can I meet the demand?

Hardware design
agosto 06, 2020 by Brylee 1307

Requirements: LEDs and buttons share the IO port of an MCU

Goal: When the button is pressed once, the light is on, and it stays on until the corresponding button is pressed again, and the light is off

The picture I draw now cannot meet this requirement, because when the light is on, the IO port of the MCU is high, and both sides of the button are high, and it is impossible to give a signal to the MCU. How can you design to meet the demand without adding other types of components?

todos los comentarios

user image

Cheyanne Publicado en August 6, 2020

You explain first, what kind of operation is required, that is, when the switch is pressed, MCU_IO goes from HIGH to LOW??

0
user image

Jaylah Publicado en August 6, 2020

Remove 3K, set the R value according to the actual lamp design resistance value, and exchange the LED with the switch. IO is initialized to high impedance or high level. When the button is pressed, the LED is on and the IO outputs low level. The LED is always on. When the button is pressed again, the IO outputs high level and the LED is off. Personal analysis. No verification. for reference only

0
user image

Kaliyah Publicado en August 6, 2020

See if this design is feasible?

0

Escribe una respuesta

Necesitas iniciar sesión para responder. Iniciar sesión | Registro