/* Hello World Program Date: 6-13-06 Author: Evan Dudzik This program is intended as a simple first program for a beginner to test. It toggles all output-capable port pins, so that an LED will flash when connected. */ #include #pragma DATA 0x2007, 0x3F50//_INTRC_IO & _WDT_OFF & _LVP_OFF void main() { //*********************// // configure I/O ports // //*********************// portb = 00000000b; trisb = 00000000b; //0 = Output, 1 = Input porta = 00000000b; trisa = 00000000b; //0 = Output, 1 = Input //********************// // more configuration // //********************// osccon = 01110000b; //internal oscillator @ 8MHz cmcon = 00000111b; //comparators off adcon0 = 00000000b; //ADC off while(1) //repeat indefinitely { porta=00000000b; //pull all port A pins low portb=00000000b; //pull all port B pins low delay_s(1); //wait 1 second porta=11111111b; //pull all port A pins low portb=11111111b; //pull all port B pins low delay_s(1); //wait 1 second } }