Looking physically at any microcontroller you can readily see rows of pins that allow the microcontroller to control and communicate with outside devices. Looking at the pins in the diagram we notice that each pin has a long name, with several designations separated by a slash. Because microcontrollers have a limited number of pins and at the same time a large number of peripherals, the manufacturer has to multiplex the pins among the internal modules. This means that each pin has a number of functions that it can perform, but only one of them at a time. As GPIO pins, each pin is independently controlled and can be made an input and an output, high or low. You might not realize it, but you have just stumbled upon one of the first thing every embedded designer must do.

Author:Mezit Vijinn
Language:English (Spanish)
Published (Last):24 June 2014
PDF File Size:16.49 Mb
ePub File Size:2.10 Mb
Price:Free* [*Free Regsitration Required]

Email Contact Us. Ports 1 and 2 have interrupt capabilities and can have internal pullup resistors. Please note that there is no Port 0. The pins P2. Writing a 1 will make the corresponding Port bit as output and a Zero would make corresponding Port bit as input. The register PxOUT contains the data that is available to the outside pins. Writing a 1 will make the corresponding Port bit high and a zero would make the corresponding Port bit low. The two registers are both bit and byte addressable.

Now lets create a small program to light up an LED connected to P1. Before Compiling and downloading the program makes sure that correct settings are selected. Please make sure that the correct microcontroller is selected. Make sure that P1. The LED will light up now when you run the program.

After the MSP is Reset ,its watch dog timer starts the count down and resets the controller within a specified time period.

Port Interrupts in MSP MSP is designed as an ultra low power microcontroller which stays in sleep for most of its working life to conserve power. The controller wakes up periodically to react to changes in the external environment and goes back to sleep after it has done its job. Due to the unique nature of its architecture interrupts play an important role in the working of the MSP controller. Almost all the peripherals inside the MSP can generate interrupts and wake up from its slumber.

Here we are going to set up the port interrupts of MSP Ports 1 and 2 of MSPG has interrupt capabilities. The Ports also has built in internal pullup resistors which can be enabled by software. There is also an option to select the edge falling edge or rising edge which will trigger the interrupt. If you are using launchpad development board you can see that P1. Depending upon the version of Launchpad a pullup resistor R34? Refer the circuit which comes with your board and the Launchpad PCB to confirm the existence of the resistor.

If the resistor is present on the board there is no need to enable the internal pull up resistors. Now you have to set the following registers to get the interrupt to work. Should be set as input in this case. Now lets create a small program that would toggle the LED connected to P1.

In this case I am using the tactile switch connected to P1. The port pin P1. The above program shows how to initialize the port P1. It is used to enable or disable the maskable interrupts of the MSP If this bit is not set the P1.

Sometimes people will configure everything and forget to set the GIE bit and then start hunting through myriad of register options to troubleshoot the problem. A detailed explanation of Low Power Modes is present in the user manual of the respective controller along with the power consumption data for each modes.

When an interrupt happens processor wakes up from the Low power mode and goes to the interrupt vector location. If you are coding using assembly language you have to provide the address of the location in hex.

Since we are using C, we can do it as. After that you can toggle the LED connected to the P1. In other cases like enabling I2C or Capacitive touch sensing you have to explicitly configure the PxSEL registers to enable the pins for performing that function.

The information on how to configure the port selection registers is present in the datasheet of the controller. Back to Main Page. Privacy Policy. All rights reserved. All trademarks and service marks are the properties of their respective owners. Skip to main content. Search form Search. Request new password. Ports of MSP Submitted by Rahul. Sreedharan on 7 June - am.

Log in to post comments. Original design by Simple Themes.


MSP430 LaunchPad Tutorial - Part 4 - UART Transmission

It features everything you need to start developing on an MSP microcontroller device. Light fight is a game in which two players compete and the winner is the person who presses more correct buttons based on a control light. This distiller converts the entire drainage water from our college NITK into pure drinking water free from soluble and insoluble impurities. People who forget their keys before leaving their homes will never again face face a situation of waiting for someone else to open the door. Enhance your table tennis skills with our ball smasher machine, which provides easy control via an Android app. Never again will a careless friend walk out of your room with one of your treasured items, never to return without you first knowing. This security system aims to equip rooms with a cheap but fairly reliable system using ultrasonic sensors to detect movement.


Datasheet Texas Instruments MSP430G2553

Email Contact Us. Ports 1 and 2 have interrupt capabilities and can have internal pullup resistors. Please note that there is no Port 0. The pins P2. Writing a 1 will make the corresponding Port bit as output and a Zero would make corresponding Port bit as input. The register PxOUT contains the data that is available to the outside pins.


MSP430 General Purpose Input Output (GPIO)

There are seven so far:. To those learning to program microcontrollers for the first time, these documents can seem intimidating. It can be difficult to make head or tail of microcontroller datasheets at first, but the more you use them the more familiar they become and the easier it is to find the information you need. For serious work with either of these MSP microcontrollers, the above documents are indispensible.


Ports of MSP430

PDF , 1. Extract from the document. Performance benefits that result from button optimization can include, but are not limited to, decreased power consumption, improved response time, and the ability to grow a design to include more buttons. This application report provides th.

Related Articles