lpcware

Clear Output LPC-LINK 1227

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by eliveltonsantos on Sun Dec 30 20:38:13 MST 2012
Hello,

I'm new in ARM Programming so I need some help.
I trying turn off a LED from pin 0.9 at LPC-LINK using LPC1227.

Follow down my source code:

[PHP]/*
===============================================================================
Name        : main.c
Author      : Elivélton Santos
Version     : 1.01
Copyright   : Copyright (C)
Description : Only down state a pin
===============================================================================
*/

#ifdef __USE_CMSIS
#include "LPC122x.h"
#endif

#include <cr_section_macros.h>
#include <NXP/crp.h>

__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

int main(void)
{
LPC_GPIO0 -> DIR = (1 << 9);
LPC_GPIO0 -> CLR = (1 << 9);

while (1) ;
return 0 ;
}[/PHP]

It's right build, but if I press "Program Flash" and see the voltage on pin 0.9, always 3.24V.

What I'm doing wrong?
I hope that somebody helps me. See you.

Outcomes