Hi. I have tried mbed library on a LPC1768 board (which I made for myself). So as a start point I tried simple Blinky program and a part of it didn't work!
Blinky
#include "mbed.h"
DigitalOut myled(P2_0);
DigitalOut myled1(P1_18);
int main() {
while(1) {
myled = 1;
myled1 = 1;
wait_ms(500);
myled = 0;
myled1 = 0;
wait_ms(500);
}
}
What is strange is that myled which is connected to P2_0 is not toggling but myled1 which is connected to P1_18 is toggling!
But when I try to toggle P2_0 directly (not using mbed. Simply using it's registers) it does work and toggle!
What do you think the problem is?
It's very strange to me. I mean in the above program even in Keil debugger I see that P2_0 is toggling along with P1_18 but in actual board only P1_18 is toggling.
Hi. I have tried mbed library on a LPC1768 board (which I made for myself). So as a start point I tried simple Blinky program and a part of it didn't work!
Blinky
What is strange is that myled which is connected to P2_0 is not toggling but myled1 which is connected to P1_18 is toggling!
But when I try to toggle P2_0 directly (not using mbed. Simply using it's registers) it does work and toggle!
What do you think the problem is?
It's very strange to me. I mean in the above program even in Keil debugger I see that P2_0 is toggling along with P1_18 but in actual board only P1_18 is toggling.