This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

simple GPIO Port example with MCB2300

Hi,

I'm using MCB2300 board in order to learn about ARM programming.
I used BLINKY example and it worked well.
Now, I want to set and clear another GPIO port, with the exception of the GPIOs used in BLINKY example, but I didn't get it. When I debug the program it seems it works but the board doesn't show the same result. All the GPIO ports show 2,5V.
I'm sending bellow the code I used.
Could anyone help me?

Thanks a lot.

Code:

#include <stdio.h>
#include <LPC23xx.H> /* LPC23xx definitions */

void PORTS_Init(void) { PINSEL0 = 0x00000000; FIO0DIR |= 0x00023C0; /* P0.6, P0.7, P0.8, P0.9 and P0.13 as outputs*/ FIO0MASK = 0x00000000; }

int main (void) {

PORTS_Init(); /* inicializa as portas */

FIO0SET = 0x00000100; /* set P0.8 */ FIO0SET = 0x00000200; /* set P0.9 */ FIO0SET = 0x00002000; /* set P0.13 */

while (1) { }

}

0