At 10:09 AM 7/24/2003 -0700, you wrote: >Hi to all > >I need to generate 2 pulses one of them is inverted. every 16,66 ms >Interrupt I use this to create first pulse > >Led1^=0x01; // this will toggle the bit > >Now second one I need to xor and invert > >Led2^=0x01; >Led2=(~led2); // this line generates an error I know it is wrong The ~ unary operator only works with "integer types" (char, int, etc.). Assuming you've got something else, you can use the ! operator, which works with all scalar types. Led2 = !Led2; Led1 = !Led2; Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body