the code:
- CODE: SELECT_ALL_CODE
//Turn on LED using button using PIC18f2550 using SK28
#include <p18f2550.h>
#pragma config FOSC=HS
#pragma config WDT=OFF
#pragma config MCLRE=ON
#pragma config BOR=OFF
#pragma config PWRT=ON
#pragma config LVP=OFF
#define LED RB1
#define SW RB0
void main (void)
{
PORTB=0;
TRISB=0x01;
if(SW==0) LED=1;
else LED=0;
}