EasyManua.ls 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 #38 background imageLoading...
Page #38 background image
38
Code Example
#include <msp430.h>
void BCSplus_graceInit(void);
void GPIO_graceInit(void);
void WDTplus_graceInit(void);
void System_graceInit(void);
void main(void)
{
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
while(1)
{
P1OUT ^= BIT6;
_delay_cycles(1);
};
}
void BCSplus_graceInit(void)
{
/* USER CODE START (section: BCSplus_graceInit_prologue) */
/* User initialization code */
/* USER CODE END (section: BCSplus_graceInit_prologue) */
/*
* Basic Clock System Control 2
*
* SELM_0 -- DCOCLK
* DIVM_1 -- Divide by 2
* SELS -- XT2CLK when XT2 oscillator present. LFXT1CLK or VLOCLK when XT2
oscillator not present
* DIVS_3 -- Divide by 8
* ~DCOR -- DCO uses internal resistor
*
* Note: ~DCOR indicates that DCOR has value zero
*/
BCSCTL2 = SELM_0 | DIVM_1 | SELS | DIVS_3;
if (CALBC1_1MHZ != 0xFF) {
/* Follow recommended flow. First, clear all DCOx and MODx bits. Then

Table of Contents

Other manuals for Texas Instruments MSP430

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
Program Memory TypeFlash
Clock SpeedUp to 25 MHz (depending on the specific device)
Flash MemoryUp to 512 KB (depending on the specific device)
RAMUp to 66 KB (depending on the specific device)
Operating Voltage1.8V - 3.6V (depending on the specific device)
ADC10-bit or 12-bit SAR ADC
Communication InterfacesUART, SPI, I2C, USB
DMAYes (depending on the specific device)
Operating Temperature-40°C to +85°C
Architecture16-bit RISC
Low Power ModesMultiple (LPM0 to LPM4)

Related product manuals