English
Language : 

SDBC-DK3UG Datasheet, PDF (51/76 Pages) Silicon Laboratories – 4 buttons and 4 LEDs for custom purposes
P0MDIN
=
P0MDOUT =
P0SKIP
=
P1MDIN
=
P1MDOUT =
P1SKIP
=
P2MDIN
=
P2MDOUT =
P2SKIP
=
SFRPAGE
=
P0DRV
=
P1DRV
=
P2DRV
=
SFRPAGE
=
XBR0
=
XBR1
=
XBR2
=
0xF3;
0x10;
0xCF;
0xFF;
0xFD;
0xF8;
0xFF;
0xFC;
0xFF;
CONFIG_PAGE;
0x10;
0xFD;
0xFC;
LEGACY_PAGE;
0x01;
0x40;
0x40;
// set inputs
P0
|= 0xE3;
P1
|= 0x02;
P2
|= 0x03;
//Set P0 inputs
//Set P1 inputs
//Set P2 inputs
//default I/O port
LED1_PIN
= 0;
LED2_PIN
= 0;
LED3_PIN
= 0;
LED4_PIN
= 0;
BLED_PIN
= 0;
LCD_NSEL_PIN
= 1;
LCD_A0_PIN
= 0;
LCD_RESET_PIN
= 0;
// Oscillator init: external XTAL (16MHz), SYSCLK=XTAL/2
OSCXCN = 0x77;
// 1ms delay for XTAL stabilization
for(i=0;i<500;i++);
while ((OSCXCN & 0x80) == 0);
CLKSEL = 0x01;
//Initialize SPI
SetHwMasterSpi();
LED1_PIN = 1;
delay_ms(5);
LED2_PIN = 1;
delay_ms(5);
LED1_PIN = 0;
delay_ms(5);
LED2_PIN = 0;
}
SDBC-DK3 UG
Rev. 0.4
51