Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(void) {
- //Stop Watchdog Timer
- WDTCTL = WDTPW + WDTHOLD;
- //Configure Port Directions
- P1DIR |= BIT0; // Set P1.0 to output direction
- P1DIR |= BIT1;
- //Loop forever
- for(;;) {
- //Produce a delay
- unsigned int i = 100000;
- while(i>0) {
- i--;
- }
- P1DIR ^= BIT0;
- unsigned int f = 50000;
- while(f>0) {
- f--;
- }
- P1DIR ^= BIT6;
- }
- }
Add Comment
Please, Sign In to add comment