EEI 130302
Prof. Ms. Iran
Disciplina de Microcontroladores
LIGA LED
#include "msp430.h"
int tempo = 0;
int main( void )
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset
P1DIR=BIT6; //Define o Port 1 bit 0 como saida
while(1)
{
for(tempo=0;tempo<20000;tempo++); //um for apenas para gastar o tempo
P1OUT=1; //aciona o Led
for(tempo=0;tempo<20000;tempo++); //tempo em que led fica acionado
P1OUT=0; //apaga o Led
}
}
SOS
#include "msp430.h"
int tempo = 0;