Single Chip Microcomputer Lesson 6th: Principle of independent button Detection

Source: Internet
Author: User

Connect the 8th pin of jp5 to the P1 ^ 0 of the microcontroller, and then connect P1 ^ 0 with the positive pin of the light-emitting diode. (when the light-emitting diode is added to a high level, the light-emitting diode will be on, because each IO port is a high level by default when the single chip microcomputer is powered on, after the wires are connected, the light-emitting diode will light up ). When we press K1, the Light Emitting Diode goes off, the button is released, and the light emitting diode lights up again. Because when you press the button, the TTL circuit only has two levels, showing the relationship between the "line and", and again detecting the level of P1 ^ 0 pin, you will find that it is already low. Because the high level and the upper level are equal to the lower level.

Single Chip Microcomputer Lesson 6th: Principle of independent button Detection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.