Veronica Amigo

turn on leds in mcf5329

Discussion created by Veronica Amigo on May 25, 2007
Latest reply on Jun 9, 2007 by Alexandre Kremer
Hello,
 
I wrote a message because I didn´t know how turn on leds in m5329evb.
 
Somebody said to me:
 
"
On the M5329EVB evaluation board, the LEDs are connected to the TIMER port. To flash them, you need to carry out two steps:

(a) Configure the TIMER port for General Purpose output:
    /* Pin assignments for port TIMER            Pins are all GPIO outputs     */    MCF_GPIO_PDDR_TIMER = MCF_GPIO_PDDR_TIMER_PDDR_TIMER3 |                          MCF_GPIO_PDDR_TIMER_PDDR_TIMER2 |                          MCF_GPIO_PDDR_TIMER_PDDR_TIMER1 |                          MCF_GPIO_PDDR_TIMER_PDDR_TIMER0;    MCF_GPIO_PAR_TIMER = 0;
(b) Toggle bits in the PODR_TIMER register to turn the LEDs on and off, e.g:
   /* Sample code: Loop to flash LED */    while (1) {        MCF_GPIO_PODR_TIMER ^= MCF_GPIO_PODR_TIMER_PODR_TIMER3;        for (i = 0; i < 500000; i++)            asm ("nop");    }
"
but I need turn on only a LED, not both simultaneously. That I can do?

Outcomes