main.c 410 B

1234567891011121314151617181920212223242526
  1. #include <msp430g2553.h>
  2. void main (void)
  3. {
  4. WDTCTL = WDTPW + WDTHOLD;
  5. P1DIR = 0x41;
  6. P1OUT = 0x01;
  7. BCSCTL3 |= LFXT1S_2;
  8. IFG1 &= ~OFIFG;
  9. __bis_SR_register(SCG1 + SCG0);
  10. BCSCTL2 |= SELM_3 + DIVM_3;
  11. while (1)
  12. {
  13. P1OUT = 0x41;
  14. __delay_cycles(100);
  15. P1OUT = 0x00;
  16. __delay_cycles(100);
  17. P1OUT = 0x40;
  18. __delay_cycles(100);
  19. P1OUT = 0x00;
  20. __delay_cycles(1000);
  21. }
  22. }