Sie sind auf Seite 1von 4

/*******************************************************************************

*****
Code created using the ARMwizard, visit http://alexan.edaboard.eu
********************************************************************************
****/
#include <LPC23xx.h>
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

I2C0CONCLR I20CONCLR
I2C1CONCLR I21CONCLR
I2C2CONCLR I22CONCLR
INTCLEAR MAC_INTCLEAR
USBDevIntClr DEV_INT_CLR
USBEpIntClr EP_INT_CLR
USBDMARClr DMA_REQ_CLR
USBEoTIntClr EOT_INT_CLR
USBNDDRIntClr NDD_REQ_INT_CLR
USBSysErrIntClr SYS_ERR_INT_CLR
OTGIntClr OTG_INT_CLR
ILR RTC_ILR
IO0DIR IODIR0
IO1DIR IODIR1
MCIClear MCI_CLEAR
DMACIntClear GPDMA_INT_TCCLR
DMACIntErrClr GPDMA_INT_ERR_CLR

int main(void)
{
/*
P0.0: PORT0.0 (General purpose I/O) Input, pull-up resistor enabled
P0.1: PORT0.1 (General purpose I/O) Input, pull-up resistor enabled
P0.2: PORT0.2 (General purpose I/O) Output, pull-up resistor enabled
P0.3: PORT0.3 (General purpose I/O) Output, pull-up resistor enabled
P0.4: PORT0.4 (General purpose I/O) Output, pull-up resistor enabled
P0.5: PORT0.5 (General purpose I/O) Input, pull-up resistor enabled
P0.6: PORT0.6 (General purpose I/O) Input, pull-up resistor enabled
P0.7: PORT0.7 (General purpose I/O) Input, pull-up resistor enabled
P0.8: PORT0.8 (General purpose I/O) Input, pull-up resistor enabled
P0.9: PORT0.9 (General purpose I/O) Input, pull-up resistor enabled
P0.10: PORT0.10 (General purpose I/O) Input, pull-up resistor enabled
P0.11: PORT0.11 (General purpose I/O) Input, pull-up resistor enabled
P0.12: PORT0.12 (General purpose I/O) Input, pull-up resistor enabled
P0.13: PORT0.13 (General purpose I/O) Input, pull-up resistor enabled
P0.14: PORT0.14 (General purpose I/O) Input, pull-up resistor enabled
P0.15: PORT0.15 (General purpose I/O) Input, pull-up resistor enabled
P0.16: PORT0.16 (General purpose I/O) Input, pull-up resistor enabled
P0.17: PORT0.17 (General purpose I/O) Input, pull-up resistor enabled
P0.18: PORT0.18 (General purpose I/O) Input, pull-up resistor enabled
P0.19: PORT0.19 (General purpose I/O) Input, pull-up resistor enabled
P0.20: PORT0.20 (General purpose I/O) Input, pull-up resistor enabled
P0.21: PORT0.21 (General purpose I/O) Input, pull-up resistor enabled
P0.22: PORT0.22 (General purpose I/O) Input, pull-up resistor enabled
P0.23: PORT0.23 (General purpose I/O) Input, pull-up resistor enabled
P0.24: PORT0.24 (General purpose I/O) Input, pull-up resistor enabled
P0.25: PORT0.25 (General purpose I/O) Input, pull-up resistor enabled
P0.26: PORT0.26 (General purpose I/O) Input, pull-up resistor enabled
P0.27: PORT0.27 (General purpose I/open-drain O) Input
P0.28: PORT0.28 (General purpose I/open-drain O) Input
P0.29: PORT0.29 (General purpose I/O) Input
P0.30: PORT0.30 (General purpose I/O) Input

P0.31:
P1.0:
P1.1:
P1.4:
P1.8:
P1.9:
P1.10:
P1.14:
P1.15:
P1.16:
P1.17:
P1.18:
P1.19:
P1.20:
P1.21:
P1.22:
P1.23:
P1.24:
P1.25:
P1.26:
P1.27:
P1.28:
P1.29:
P1.30:
P1.31:
P2.0:
P2.1:
P2.2:
P2.3:
P2.4:
P2.5:
P2.6:
P2.7:
P2.8:
P2.9:
P2.10:
P2.11:
P2.12:
P2.13:
P3.0:
P3.1:
P3.2:
P3.3:
P3.4:
P3.5:
P3.6:
P3.7:
P3.23:
P3.24:
P3.25:
P3.26:
P4.0:
P4.1:
P4.2:
P4.3:
P4.4:
P4.5:
P4.6:
P4.7:
P4.8:

PORT0.31 (General purpose I/O) Input


PORT1.0 (General purpose I/O) Input, pull-up resistor enabled
PORT1.1 (General purpose I/O) Input, pull-up resistor enabled
PORT1.4 (General purpose I/O) Input, pull-up resistor enabled
PORT1.8 (General purpose I/O) Input, pull-up resistor enabled
PORT1.9 (General purpose I/O) Input, pull-up resistor enabled
PORT1.10 (General purpose I/O) Input, pull-up resistor enabled
PORT1.14 (General purpose I/O) Input, pull-up resistor enabled
PORT1.15 (General purpose I/O) Input, pull-up resistor enabled
PORT1.16 (General purpose I/O) Input, pull-up resistor enabled
PORT1.17 (General purpose I/O) Input, pull-up resistor enabled
PORT1.18 (General purpose I/O) Input, pull-up resistor enabled
PORT1.19 (General purpose I/O) Input, pull-up resistor enabled
PORT1.20 (General purpose I/O) Input, pull-up resistor enabled
PORT1.21 (General purpose I/O) Input, pull-up resistor enabled
PORT1.22 (General purpose I/O) Input, pull-up resistor enabled
PORT1.23 (General purpose I/O) Input, pull-up resistor enabled
PORT1.24 (General purpose I/O) Input, pull-up resistor enabled
PORT1.25 (General purpose I/O) Input, pull-up resistor enabled
PORT1.26 (General purpose I/O) Input, pull-up resistor enabled
PORT1.27 (General purpose I/O) Input, pull-up resistor enabled
PORT1.28 (General purpose I/O) Input, pull-up resistor enabled
PORT1.29 (General purpose I/O) Input, pull-up resistor enabled
PORT1.30 (General purpose I/O) Input, pull-up resistor enabled
PORT1.31 (General purpose I/O) Input, pull-up resistor enabled
PORT2.0 (General purpose I/O) Input, pull-up resistor enabled
PORT2.1 (General purpose I/O) Input, pull-up resistor enabled
PORT2.2 (General purpose I/O) Input, pull-up resistor enabled
PORT2.3 (General purpose I/O) Input, pull-up resistor enabled
PORT2.4 (General purpose I/O) Input, pull-up resistor enabled
PORT2.5 (General purpose I/O) Input, pull-up resistor enabled
PORT2.6 (General purpose I/O) Input, pull-up resistor enabled
PORT2.7 (General purpose I/O) Input, pull-up resistor enabled
PORT2.8 (General purpose I/O) Input, pull-up resistor enabled
PORT2.9 (General purpose I/O) Input, pull-up resistor enabled
PORT2.10 (General purpose I/O) Input, pull-up resistor enabled
PORT2.11 (General purpose I/O) Input, pull-up resistor enabled
PORT2.12 (General purpose I/O) Input, pull-up resistor enabled
PORT2.13 (General purpose I/O) Input, pull-up resistor enabled
PORT3.0 (General purpose I/O) Input, pull-up resistor enabled
PORT3.1 (General purpose I/O) Input, pull-up resistor enabled
PORT3.2 (General purpose I/O) Input, pull-up resistor enabled
PORT3.3 (General purpose I/O) Input, pull-up resistor enabled
PORT3.4 (General purpose I/O) Input, pull-up resistor enabled
PORT3.5 (General purpose I/O) Input, pull-up resistor enabled
PORT3.6 (General purpose I/O) Input, pull-up resistor enabled
PORT3.7 (General purpose I/O) Input, pull-up resistor enabled
PORT3.23 (General purpose I/O) Input, pull-up resistor enabled
PORT3.24 (General purpose I/O) Input, pull-up resistor enabled
PORT3.25 (General purpose I/O) Input, pull-up resistor enabled
PORT3.26 (General purpose I/O) Input, pull-up resistor enabled
PORT4.0 (General purpose I/O) Input, pull-up resistor enabled
PORT4.1 (General purpose I/O) Input, pull-up resistor enabled
PORT4.2 (General purpose I/O) Input, pull-up resistor enabled
PORT4.3 (General purpose I/O) Input, pull-up resistor enabled
PORT4.4 (General purpose I/O) Input, pull-up resistor enabled
PORT4.5 (General purpose I/O) Input, pull-up resistor enabled
PORT4.6 (General purpose I/O) Input, pull-up resistor enabled
PORT4.7 (General purpose I/O) Input, pull-up resistor enabled
PORT4.8 (General purpose I/O) Input, pull-up resistor enabled

P4.9:
P4.10:
P4.11:
P4.12:
P4.13:
P4.14:
P4.15:
P4.24:
P4.25:
P4.28:
P4.29:
P4.30:
P4.31:

PORT4.9 (General purpose I/O) Input, pull-up resistor enabled


PORT4.10 (General purpose I/O) Input, pull-up resistor enabled
PORT4.11 (General purpose I/O) Input, pull-up resistor enabled
PORT4.12 (General purpose I/O) Input, pull-up resistor enabled
PORT4.13 (General purpose I/O) Input, pull-up resistor enabled
PORT4.14 (General purpose I/O) Input, pull-up resistor enabled
PORT4.15 (General purpose I/O) Input, pull-up resistor enabled
PORT4.24 (General purpose I/O) Input, pull-up resistor enabled
PORT4.25 (General purpose I/O) Input, pull-up resistor enabled
PORT4.28 (General purpose I/O) Input, pull-up resistor enabled
PORT4.29 (General purpose I/O) Input, pull-up resistor enabled
PORT4.30 (General purpose I/O) Input, pull-up resistor enabled
PORT4.31 (General purpose I/O) Input, pull-up resistor enabled

*/
PINSEL0 = 0x00000000;
PINMODE0 = 0x00000000;
IO0DIR = 0x0000001C;
PINSEL1 = 0x00000000;
PINMODE1 = 0x00000000;
PINSEL2 = 0x00000000;
PINMODE2 = 0x00000000;
IO1DIR = 0x00000000;
PINSEL3 = 0x00000000;
PINMODE3 = 0x00000000;
PINSEL4 = 0x00000000;
PINMODE4 = 0x00000000;
FIO2DIR = 0x00000000;
PINSEL6 = 0x00000000;
PINMODE6 = 0x00000000;
FIO3DIR = 0x00000000;
PINSEL7 = 0x00000000;
PINMODE7 = 0x00000000;
PINSEL8 = 0x00000000;
PINMODE8 = 0x00000000;
FIO4DIR = 0x00000000;
PINSEL9 = 0x00000000;
PINMODE9 = 0x00000000;

/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00011100 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */
/* binary: 00000000_00000000_00000000_00000000 */

/******************************************************************************
GPIO interrupts
*******************************************************************************
P0.0 : On rising edge
*/
IO0_INT_EN_R = 0x00000001;
/* binary: 00000000_00000000_00000000_0000000
1 */
IO0_INT_EN_F = 0x00000000;
/* binary: 00000000_00000000_00000000_0000000
0 */
IO2_INT_EN_R = 0x00000000;
/* binary: 00000000_00000000_00000000_0000000
0 */
IO2_INT_EN_F = 0x00000000;
/* binary: 00000000_00000000_00000000_0000000
0 */
/******************************************************************************
Timer0 (32bit)
*******************************************************************************
Counter Disabled,
Counter Reset=0
Timer mode: count on rising edge of PCLK
Counter clk: 15 MHz, Counts every: 66.67 ns (calculated with peripheral cloc

k: 15MHz)
*/
PCONP = (PCONP & 0xFFE87FDE) | (1UL<<1);
imer0 (default is enabled) */

/* Enable peripheral clock for T

T0CTCR = 0x00;
/* binary: 00000000 */
T0TC = 0x00000000;
/* decimal 0 */
T0PR = 0x00000000;
/* decimal 0 */
T0MCR = 0x0000;
/* binary: 00000000_00000000 */
T0MR0 = 0x00000000;
/* decimal 0 */
T0MR1 = 0x00000000;
/* decimal 0 */
T0MR2 = 0x00000000;
/* decimal 0 */
T0MR3 = 0x00000000;
/* decimal 0 */
T0CCR = 0x0000;
/* binary: 00000000_00000000 */
T0EMR = 0x0000;
/* binary: 00000000_00000000 */
T0TCR = 0x00;
/* binary: 00000000 */
while(1)
{
}
}

Das könnte Ihnen auch gefallen