Hi =A0all, I am testing pic32 and something simple I am having hard time to understand= .. I have 2 leds connected to G12 and G14 when I use test1 code LED1 never tun= s on. test2 and test3 is ok. my question is why test1 is not working. G12 and G13= are digital I/O. if i use debugger step over it works. test1: LED1 =3D 1; LED2 =A0=3D 0;=A0 delay; LED1 =3D0; LED2=3D1; delay test2: if I use & and | logic it works LED1 | =3D 1; LED2 =A0& =3D 0;=A0 delay; LED1 &=3D0; LED2 |=3D1; delay test3: if I use LATGSET and LATGCLR it works Since G12 and G14 are not analog pins and I do not have external capacitor = I do not think this is Read modify write issue. my question is do you know why test1 =A0LED1 stays off when running. here is the code. while(1) { =A0int short_delay; =A0uint8_t returnStatus1,returnStatus2; =A0 =A0 // to test =A0 =A0 =A0=A0 =A0// =A0 =A0 led_d7_green &=3D 0; =A0// =A0 =A0 led_d8_green |=3D 1; =A0// =A0 =A0 led_d7_green =3D 0; =A0// =A0 =A0 led_d8_green =3D 1; =A0 =A0 =A0 LATGCLR =3D 0x5000; =A0 // 0b0101000000000000; =A0 =A0 =A0 =A0 =A0 =A0 LATGSET =3D 0x1000; =A0 // 0b0001000000000000; =A0 =A0 =A0 short_delay =3D 1000*1000; =A0 =A0 // create short delay =A0 =A0 =A0 while(short_delay--){}; =A0// =A0 =A0 led_d7_green |=3D 1; =A0// =A0 =A0 led_d8_green &=3D 0; =A0 =A0// =A0 =A0 led_d7_green =3D 1; =A0// =A0 =A0 led_d8_green =3D 0; =A0 =A0 =A0 =A0 LATGCLR =3D 0x5000; =A0 // 0b0101000000000000; =A0=A0 =A0 =A0 =A0 LATGSET =3D 0x4000; =A0 // 0b0100000000000000; =A0=A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 short_delay =3D 1000*1000; =A0 =A0 // create short delay =A0while(short_delay--){}; =A0 =A0 } thanks=A0 Andre --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .