MSP430 MCU Gpio programming Getting Started Tutorial

Source: Internet
Author: User

In this tutorial, we will study the programming method of MSP430 MCU Gpio. This article also applies to the MSP430X2XX devices used on the Launchpad Development Board, such as msp430g2553, msp430g2231, etc. Most pins on the MSP430 microcontroller are grouped into up to 8 ports, P1 to P8. Each port is 8-bit wide and has 8 related I/O pins. These pins are mapped directly to the appropriate port registers, so the I/O pins can be operated independently. Only pins in ports P1 and P2 support interrupts. In addition, each I/O pin also has a configurable pull-up and pull-down resistor. Each port has a set of related registers that are used to manipulate each pin. The bit mappings and port groupings are as follows:

Note: The command contract for the PIN used in the Programming Guide/Data sheet is ' px.y ', where ' x ' corresponds to the port number (1 to 8), and ' Y ' corresponds to the PIN number (0 to 7) x '. For example: P1.1 is the 1th pin of Port 1, and P2.4 refers to the 4th pin of Port 2. You will see the same conventions as the marking pins on the MSP430 Launchpad board.

The current version of MSP430G2 Launchpad uses msp430g2553 and msp430g2452. Older versions (Rev1.4) use msp430g2231 and msp430g2211. However, unless otherwise noted, the programming method is the same for all supported devices.

For more information, please refer to the following link: https://www.yiboard.com/thread-772-1-1.html

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.