1507 views|0 replies

1667

Posts

0

Resources
The OP
 

Three simple steps to operate the msp430 serial port interrupt [Copy link]

Preliminary knowledge: I use msp430fr6989 (msp430 series are similar), there is a very key sentence in the datasheet:

30.3.15.1 UART Transmit Interrupt Operation

The UCTXIFG interrupt flag is set by the transmitter to indicate that UCAxTXBUF is ready to accept
another character. An interrupt request is generated if UCTXIE and GIE are also set. UCTXIFG is automatically reset if a character is written to UCAxTXBUF
.

So the general idea of the serial port interrupt program is:

1. For example, define char a[100], assign UCTXIE to 1 in our software (GIE can be ignored), and enter the interrupt function

2. After entering the interrupt function, a[0] is sent to UCAxTXBUF, the interrupt function ends, and after UCAxTXBUF completes sending a[0], the UCTXIFG interrupt flag is triggered, and the interrupt function is entered again, and a[1] is sent. The interrupt function ends, and after UCAxTXBUF completes sending a[1], the UCTXIFG interrupt flag is triggered..........After sending a[99]

3. After sending a[99], turn off the serial port interrupt, over.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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