This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> //MSP430F2619TPM | |
/* main.c */ | |
//* GPIO pin definitions *///////////////////////////////////////// | |
// LED | |
#define test_LED 0b00000001 // P1.0 test_LED | |
#define YELLOW_LED 0b00000001 // P4.0 YELLOW_LED [TB0] | |
#define RED_LED 0b00000010 // P4.1 RED_LED | |
#define BLUE_LED 0b00000100 // P4.2 BLUE_LED | |
#define GREEN_LED 0b00001000 // P4.3 GREEN_LED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> //MSP430F2619TPM | |
/** | |
* main.c | |
*/ | |
// 端子設定 ///////////////////////////////////////////////////////// | |
// LED | |
#define test_LED 0b00000001 // P1.0 test_LED | |
#define RED_LED 0b00000010 // P4.1 RED_LED [TB1] | |
#define BLUE_LED 0b00000100 // P4.2 BLUE_LED [TB2] | |
#define GREEN_LED 0b00001000 // P4.3 GREEN_LED[TB3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> //MSP430F2619TPM | |
/** | |
* main.c | |
*/ | |
// 端子設定 ///////////////////////////////////////////////////////// | |
// LED | |
#define test_LED 0b00000001 // P1.0 test_LED | |
#define RED_LED 0b00000010 // P4.1 RED_LED [TB1] | |
#define BLUE_LED 0b00000100 // P4.2 BLUE_LED [TB2] | |
#define GREEN_LED 0b00001000 // P4.3 GREEN_LED[TB3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> //MSP430F2619TPM | |
/* | |
* main.c | |
*/ | |
// 端子設定 ///////////////////////////////////////////////////////// | |
#define test_LED 0b00000001 // P1.0 test_LED | |
#define RED_LED 0b00000001 // P6.0 RED_LED | |
#define BUTTON 0b00000010 // P6.1 BUTTON | |
#define BLUE_LED 0b00010000 // P6.4 BLUE_LED | |
#define GREEN_LED 0b10000000 // P6.7 GREEN_LED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> //MSP430F2619TPM | |
// 端子設定 ////////////// | |
#define test_LED 0b00000001 // P1.0 test_LED | |
void setup() { | |
WDTCTL = WDTPW + WDTHOLD; // Stop WathcDog Timer, | |
SVSCTL &= ~SVSFG; // 低電圧フラグを消去 Supply Voltage Supervisor | |
SVSCTL = 0x60 + PORON; // SVS POR enabled @ 2.5V 電圧低下検出.この電圧以下ではマイコンリセット. | |
while(!(SVSCTL & SVSON)); // 電圧監視機能がONになるまで待機 |