1117 views|0 replies

1662

Posts

0

Resources
The OP
 

MSP430F149 IO port [Copy link]

1 Overview

MSP430F149 has 6 groups of IO ports, each with 8 bits. The settings of IO ports include setting IO function, direction, and initial value of input and output registers. If no settings are made for IO ports, the default setting is the first function, input mode.

2 Commonly used registers

PxDIR 0 input, 1 output;

PxSEL 0 I/O port, 1 second function;

PxOUT, PxIN;

PxIES sets the interrupt trigger mode to 0 rising edge, 1 falling edge;

PxIE sets the interrupt trigger to enable 0 to disable, 1 to enable;

PxIFG interrupt flag register, needs to be cleared by software.

3 Usage

IO port interrupt:

P1 and P2 have a total of 16 IO ports that can trigger interrupts. The relevant register is PXIE (interrupt enable): 0 does not allow, 1 allows. PXIES (interrupt trigger rock selection) 0 rising edge, 1 falling edge. PXIFG (interrupt flag register), when the I0 port meets the interrupt, the corresponding position is 1, which can only be cleared by software. P1 and P2 share two interrupt entry points PORT1_VECTOR and PORT2_VECTOR respectively. Note that the IO port interrupt mode input is still the first function, PXSEL=0.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list