The difference between a port and a pin

Source: Internet
Author: User
PIN is the chip external pin Ah, a chip at least VCC,GND pin, like 51 single-chip computer and IO PIN, serial pin, etc., PIN is a physical external pipe leg AH.

The port is the MCU internal (CPU unit) and external IO interface group, such as PA port, there are 8 pins, pa0~pa7. The port in the IO space map has a register, this register reflects the status of the current port, such as the input voltage on the PA0 port is a 0~5v signal, the microcontroller will be mapped into the register when the threshold (such as 1.8V), the corresponding bit below this threshold register is 0, above the threshold corresponding bit is 1. General ports also have other control registers, such as control port pin input and output registers, such as control port pin multiplexing registers and so on. When the port pin is set to output, write 1 to the corresponding output register, the corresponding IO pin of the port will output an approximate VCC level, when the corresponding bit write 0 o'clock, the corresponding IO pin of the port will output an approximate 0V level.

The difference between a port and a pin

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.