TOP

How to connect single key and MCU to prevent I/O port damage effectively?

In product development, the key is the most common functions, taking such cost factors into consideration, many clients connected the ends of the keys directly to MCU and GND, in most cases there is no problem. However, when the product works in poor environment, such as static electricity, power supply noise, etc., at this time, once the button is pressed, that is equivalent to one of the MCU I/O port is connected directly to GND, thus, it is likely that there will be instantaneous high-current or high voltage or even negative pressure poured into I/O port, causing I/O damage.

The precaution to reduce this problem is: according to the needs of actual circuit, connect a 100ohm ~ 1Kohm resistance in series between the button and MCU I/O port, which can effectively prevent the damage caused by these problems.