Alright, here's my entire program, I added TRISA in: I'm currently running a 16F684 on a PICKit 1, and I'm trying to get 1 of the lED to light up. But unfortunately it refuses to. #include __CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS & UNPROTECT \ & UNPROTECT & BORDIS); > void init() { PORTA = 0; CMCON0 = 7; ANSEL = 0; TRISA4 = 0; TRISA5 = 0; } main() { init(); while(1) { for (int i = 0; i < 255; i++) for (int j = 0; j < 129; j++); > RA4 = 1; > for (int i = 0; i < 255; i++) for (int j = 0; j < 129; j++); > RA4 = 0; } } - Xiao Xu On Sat, May 29, 2010 at 9:32 AM, Olin Lathrop wrote: > Wouter van Ooijen wrote: >>> PORTD |= 1<<0; >> >> But *do google for "read modify write problem"*. The above line might >> *fail* on a PIC (with all compilers). > > The above line will turn on the intended bit. The failure is that it might > alter other bits. > > > ******************************************************************** > Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products > (978) 742-9014. Gold level PIC consultants since 2000. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist