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 #78 background imageLoading...
Page #78 background image
78
while(1)
{
if((P1IN & BIT3) == !BIT3)
{
while((P1IN & BIT3) == !BIT3);
Flash_Erase(0x1000);
Flash_Write_Char(0x1000, value);
lcd_print(13, 1, value);
P1OUT |= BIT0;
_delay_cycles(40000);
P1OUT &= ~BIT0;
}
delay_ms(20);
lcd_print(4, 1, value);
value++;
delay_ms(200);
};
}
void Flash_graceInit(void)
{
/* USER CODE START (section: Flash_graceInit_prologue) */
/* User initialization code */
/* USER CODE END (section: Flash_graceInit_prologue) */
/*
* Flash Memory Control Register 2
*
* FSSEL_1 -- MCLK
* ~FN5 -- Flash controller clock divider bit 5
* FN4 -- Flash controller clock divider bit 4
* ~FN3 -- Flash controller clock divider bit 3
* FN2 -- Flash controller clock divider bit 2
* ~FN1 -- Flash controller clock divider bit 1
* FN0 -- Flash controller clock divider bit 0
*
* Note: ~<BIT> indicates that <BIT> has value zero
*/
FCTL2 = FWKEY | FSSEL_1 | FN4 | FN2 | FN0;
/* USER CODE START (section: Flash_graceInit_epilogue) */
/* User code */
/* USER CODE END (section: Flash_graceInit_epilogue) */
}
void GPIO_graceInit(void)
{
/* USER CODE START (section: GPIO_graceInit_prologue) */
/* User initialization code */
/* USER CODE END (section: GPIO_graceInit_prologue) */
/* Port 1 Output Register */
P1OUT = BIT3;

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