Isaac, I just checked no analog thanks AA om: Isaac Marino Bavaresco To: Microcontroller discussion list - Public. =20 Sent: Thursday, December 22, 2011 10:23 AM Subject: Re: [PIC] port pin problem any help? =20 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=A0 =A0 =A0 // BGA C3 > #define LED5PORTGbits.RG14=A0 =A0 =A0 // BGA C4 > > > > in main I have > > >=A0 =A0 TRISGbits.TRISG12=A0 =3D 0;=A0 // LED4 is left small green >=A0 =A0 TRISGbits.TRISG14=A0 =3D 0;=A0 // LED5 is right small green > > mPORTGClearBits( BIT_12 | BIT_14 ); >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mPORTGSetPinsDigitalOut( BIT_12 | BIT_14 = ); > > > while loop I have >=A0 =A0 =A0 =A0 =A0 =A0=20 >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LED4 =3D 1;= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 //if I use like this doesn't work >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LED5 =3D0; > > but if I use macro below it works > >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mPORTGClearBit= s( BIT_12 );=A0 // turn off left small green led=20 >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mPORTGSetBits= ( BIT_14 );=A0 =A0 // turn on right 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 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .