#include <system.h>
#pragma CLOCK_FREQ 4000000 // config clock to 4mhz.
// Set configuration fuse.
[COLOR="red"]#pragma DATA _CONFIG, _XT_OSC & _WDT_OFF & _CP_OFF & _PWRTE_OFF[/COLOR]
void main()
{
trisb = 0; //configure port B pins as output
while( 1 ) //endless loop
{
portb.0=1; // set portb pin0 to high.
portb.1=0; // set portb pin1 to low.
delay_ms( 500 ); // pause 0.5 seconds
portb=0x02; // shows hex notation for entering data.
delay_ms(500); // you can also write portb=2 in decimal
}
}