Ricaro Ortega MagaA±a

Tutorial - Blink Led - Parpadear Led TWR-MCF51CN

Discussion created by Ricaro Ortega MagaA±a on Nov 4, 2009
Latest reply on Nov 10, 2009 by Flavio Henrique Pereira de Oliveira
#include /* for EnableInterrupts macro */ #include "derivative.h" /* include peripheral declarations */    void main(void) {  EnableInterrupts; /* enable interrupts */   PTGDD=32; // 7 6 5 4 3 2 1 0 // 128 64 32 16 8 4 2 1    int c=0; for(;;) { for(c=0;c!=50000;c++); PTGD=0; for(c=0;c!=50000;c++); PTGD=32; __RESET_WATCHDOG(); /* feeds the dog */ } /* loop forever */ /* please make sure that you never leave main */ }

Outcomes