I am having a difficult time getting the MPLAB IDE c compiler to work on = the computers at the university (I get a warning that my class is not = registered). I am just trying to use the demo package. Does anyone know = how to get around this or have assembly? Thanks again for the help, Tom RADAR Engineering Team Engineering Dept. Lake Superior State University 650 W. Easterday Ave. Sault Ste. Marie, MI 49783 PH: 906-635-2692 FX: 906-635-6663 radar@lssu.edu >>> Andre Abelian 03/16/2003 2:24:47 AM >>> Tom, I think I didn't send the right code try this one works for sure. /* simple led right,left move C code for Hi-Tech compiler*/ #include #include "delay.c" #define PORTBIT(adr, bit) ((unsigned)(&adr)*8+(bit)) static bit led1 @ PORTBIT(PORTB, 0); static bit led8 @ PORTBIT(PORTB, 7); // function declaration void ledm1(void); void port_init(void); // main program void main(void) { port_init(); // setup port I/O while(1){ ledm1(); // call led funtion }} // led move 1 void ledm1(void) { unsigned int c; // setup c for count led1=3D1; // make RB0 on DelayBigMs(20); // delay for(c=3D7;c!=3D0;c--) { PORTB <<=3D 1 ; // shift left since c!=3D0 it will exit when = c=3D=3D0 DelayBigMs(20); } led8=3D1; DelayBigMs(20); for(c=3D7;c!=3D0;c--) { PORTB >>=3D 1; DelayBigMs(20); } } // Port Init I/O etc: void port_init(void) { TRISB=3D0x00; // set portb output // TRISA=3D0xFF; // set porta all input // TRISC=3D0x00; // all output PORTB=3D0x00; // make sure all leds off // PORTC=3D0xFF; // make all portC input } you can get delay include file from microchipc.com Andre Abelian -----Original Message----- Does anybody have basic source code I could use to test my programmer with? A blinking light would be great! Tom -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu=20 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu