1234567891011121314151617181920212223242526 |
- #include <msp430g2553.h>
- void main (void)
- {
- WDTCTL = WDTPW + WDTHOLD;
- P1DIR = 0x41;
- P1OUT = 0x01;
- BCSCTL3 |= LFXT1S_2;
- IFG1 &= ~OFIFG;
- __bis_SR_register(SCG1 + SCG0);
- BCSCTL2 |= SELM_3 + DIVM_3;
- while (1)
- {
- P1OUT = 0x41;
- __delay_cycles(100);
- P1OUT = 0x00;
- __delay_cycles(100);
- P1OUT = 0x40;
- __delay_cycles(100);
- P1OUT = 0x00;
- __delay_cycles(1000);
- }
- }
|