mi14chal
Newbie level 5
- Joined
- Oct 30, 2010
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,354
I wrote a simple program as below:
I've connected 150 ohm resistor and LED to these ports. But when I turn on the power supply diodes are acting strangely. There are three "cases" of said strange acting - 1) diodes simply don't light up, 2) only one of them light up, 3) three dioes light up. The interesting thing is that diode connected to port P0.2 never happen to light up. Do you have any idea what may cause such a problems?
Code:
#include <LPC213x.h>
int main (void)
{
IODIR1 = (1 << 25) | (1 << 24);
IODIR0 = (1 << 1) | (1 << 2);
for(;;)
{
IOSET1 = (1 << 25) | (1 << 24);
IOSET0 = (1 << 1) | (1 << 2);
}
}
I've connected 150 ohm resistor and LED to these ports. But when I turn on the power supply diodes are acting strangely. There are three "cases" of said strange acting - 1) diodes simply don't light up, 2) only one of them light up, 3) three dioes light up. The interesting thing is that diode connected to port P0.2 never happen to light up. Do you have any idea what may cause such a problems?
Last edited: