LPC1114 GPIO P1.0~P1.3 doesn't work

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1114 GPIO P1.0~P1.3 doesn't work

939件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by perussi on Mon Aug 24 05:47:02 MST 2015
I'm not able to make it work the GPIO P1.0-P1.3 of LPC1114. Both in hardware as in keil debug the GPIO's P1.0 dont clear.

int main()
{
/* Enable AHB clock to the GPIO domain. */
LPC_SYSCON->SYSAHBCLKCTRL |= (0x1UL << 16);  /* enable clock for IOCON      */
LPC_SYSCON->SYSAHBCLKCTRL |= (0x1UL << 6);  /* enable clock for GPIO      */

LPC_IOCON->R_PIO1_0 |= 0x01;/* P1.0 as GPIO      */
LPC_GPIO1->DIR  |= (1UL <<  0);/* P1.0 as GPIO      */
LPC_GPIO1->DATA &= ~(1UL <<  0);/* Clear P1.0      */ //*********Don't work

while(1);
}


what's wrong with this code?
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by perussi on Mon Aug 24 09:36:31 MST 2015
I have checked the setup and are ok
0 件の賞賛
返信

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Aug 24 06:35:54 MST 2015

Quote: perussi
what's wrong with this code?



Nothing  :D

Check your setup, especially LPC_IOCON->R_PIO1_0  :O
0 件の賞賛
返信