Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Working in LPC Xpresso

Status
Not open for further replies.

PRABAKARDEVA

Full Member level 2
Joined
Sep 16, 2013
Messages
127
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Location
Chennai
Activity points
2,168
Hi

I am newbie to work with LPC 1313 Microcontroller.Already I had Worked in 8 bit controllers.
i have written a code to toggle a led.That code was compiled without any errors and hex file also generated.


But thats not working in my board.So i suspect on hex file generation and in my coding..i will post my code.
Is there any procedure for generating hex file.?

Thanks in advance


Code:
#include "LPC13xx.h"
#include <cr_section_macros.h>

/*----------------------------------------------------*/

int main(void) {

	LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6);	/* Enable clock to the GPIO peripheral */

	LPC_GPIO1->DIR |= (1 << 5);				/* Set pin direction of PIO1_5 as output */


	int i;

    while(1) {								/* Until power is available */

    	LPC_GPIO1->DATA |= (1 << 5);		/* Set the output of PIO1_5 as one */

    	for(i = 0; i < 1000000; i++) {		/* Wait (500ms approx.) */
    	}

    	LPC_GPIO1->DATA &= ~(1 << 5);		/* Set the output of PIO1_5 as zero */

    	for(i = 0; i < 1000000; i++) {		/* Wait (500ms approx.) */
    	}

    }
    return 0 ;
}
/*----------------------------------------------------*/
 

To test it will be better if you zip and post the complete LPC Xpresso project files.
 

led toggle project
 

Attachments

  • led_toggle.zip
    202.9 KB · Views: 51

Is this a development board with the LED already incorporated in the design?

If so, do you have a schematic of the board? Or link where it can be downloaded?

If not, what are the specs of the LED and how is it specifically attached to the port pin?

Also, what is the frequency of the external crystal or oscillator?

BigDog
 

yeah..this is a development board which was designed by us.i will upload the snap of the board.It is attached to the Port pin through 2.7k.we are not using any external oscillator.
 

Attachments

  • 20150512_093339.jpg
    20150512_093339.jpg
    1.9 MB · Views: 43

Typically the LPC1313 can only sink or source 2-3mA per pin and if an internal pullup is active, the VOH drops to about 2.7V.

What are the current requirements and VF of those LEDs?


BigDog
 

vf is 1.7v and 0.6A..

- - - Updated - - -

Actually i don't have problem in hardware....i suspect in software itself...so i need your help.
 
Last edited:

I am having a doubt either right here or in my code.Till i couldn't find that.
 

Attachments

  • Properties for led_toggle.jpg
    Properties for led_toggle.jpg
    136 KB · Views: 46

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top