EasyManuals Logo

Texas Instruments MSP430 User Manual

Texas Instruments MSP430
413 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #384 background imageLoading...
Page #384 background image
384
Simulation
Explanation
Software UART is created with digital I/Os. Thus, the very first task we need to do is to initialize these
pins. The SW_UART header file states which pins and ports are used. So, you only need to set these
first. All of my codes are modular and so once you set these properly the functions and the definitions
associated take care of other tasks. This, in turn, makes the codes easily to use and ready for quick
modifications/deployments.
#define SW_UART_RXD_DIR P1DIR
#define SW_UART_TXD_DIR P1DIR
#define SW_UART_RXD_OUT P1OUT
#define SW_UART_TXD_OUT P1OUT
#define SW_UART_RXD_IN P1IN
#define SW_UART_RXD_IN_RES P1REN
#define SW_UART_RXD_PIN BIT1
#define SW_UART_TXD_PIN BIT2
Once the pins are set as per requirement, it is needed to initialize them for software UART
functionality.
void SW_UART_init(void)
{
SW_UART_TXD_DIR_OUT();
SW_UART_RXD_DIR_IN();
SW_UART_TXD_OUT_HIGH();
delay_ms(10);
}

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals