4237 views|6 replies

24

Posts

0

Resources
The OP

Please help to find the problem [Copy link]

I am using LPC1114, the program is a sample program, the jumper check is normal, please help,

Below are the jumpers already connected.

1. VUSB and VC
2. 3V3P and 3V3
3. URXD and P1_6
4. UTXD and P1_7
5. URST and P0_0
6. UISP and P0_1
7. D1 and P3_5

The main program is as follows

int main() {
SystemInit();
/* Enable AHB clock to the GPIO domain. */
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);
LPC_GPIO3->DIR |= LED; // pin output
for(;; ) {
LPC_GPIO3->DATA &= ~LED; // reset pin : LED light
Delay(1000000);
LPC_GPIO3->DATA |= LED; // set pin: LED off
Delay(1000000);
}
}

Compiling with KEIL UV4 was successful.

After that, I successfully downloaded it using FLASH MAGIC. I also tried the lower baud rate of 115200.

I hope you can help me find the problem.

[This post was last edited by zgl198905 on 2011-2-18 21:25]
This post is from NXP MCU

Latest reply

Do you think the routine can be used? There are many examples in the forum.  Details Published on 2011-2-19 13:49

24

Posts

0

Resources
2
In addition, the green light of the power supply is still on but the red light of D1 is not on and is not flashing.
This post is from NXP MCU

2125

Posts

0

Resources
3
How to write Delay?
This post is from NXP MCU
Personal signature处处留心皆学问!

24

Posts

0

Resources
4

Software written void Delay(unsigned nCount) { for(; nCount != 0; nCount--); }

In addition, I also changed the delay to 10000 and tried it, but it didn't light up.

The chip should be fine. When I first received it, the green light was on and the red light was flashing.

[This post was last edited by zgl198905 on 2011-2-19 08:45]
This post is from NXP MCU

2125

Posts

0

Resources
5
Do you think the routine can be used? There are many examples in the forum.
This post is from NXP MCU
Personal signature处处留心皆学问!

24

Posts

0

Resources
6

Here are some examples, not using KEIL UV4

I'll try changing it first. I saw that it seems to be from Zhou Ligong. In addition, I only have the Cortex-M0 core LPC1114 core module of Zhilin Measurement and Control.

Many examples are on the board.

[This post was last edited by zgl198905 on 2011-2-20 19:52]
This post is from NXP MCU

24

Posts

0

Resources
7

Found the problem!!! When defining the IO output direction, there is a sentence: LPC_GPIO3->DIR |= LED; The LED here is defined as follows #define LED (1<<2) // (*) But when connecting the jumper, D1 (LED) and P3_5 are connected together. Here, change the sentence (*) to #define LED (1<<5) so that p3_5 can output. After the change, the light is on!

Attached here is the modified file. All you need is the LPC1114 core board. People who are just starting out like me can give it a try.

[This post was last edited by zgl198905 on 2011-2-22 12:48]

1.0 - GPIO_OUT.zip

113.48 KB, downloads: 0

This post is from NXP MCU

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list