Does this pin have analog capabilities? If so, try disabling its analog function (AD1PCFG or the like). Isaac Em 22/12/2011 16:07, Andre Abelian escreveu: > Hi all, > > I am working on pic32 and I noticed a problem turning LED on > when i am using LED4=3D1; it doesn't work when I program but it works whe= n I debug > but when i use macro it works when i program. any idea? > > > #define LED4PORTGbits.RG12 // BGA C3 > #define LED5PORTGbits.RG14 // BGA C4 > > > > in main I have > > > TRISGbits.TRISG12 =3D 0; // LED4 is left small green > TRISGbits.TRISG14 =3D 0; // LED5 is right small green > > mPORTGClearBits( BIT_12 | BIT_14 ); > mPORTGSetPinsDigitalOut( BIT_12 | BIT_14 ); > > > while loop I have > =20 > LED4 =3D 1; //if I use l= ike this doesn't work > LED5 =3D0; > > but if I use macro below it works > > mPORTGClearBits( BIT_12 ); // turn off left= small green led=20 > mPORTGSetBits( BIT_14 ); // turn on righ= t small green led > > > > any idea? > > thanks > > Andre --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .