pic microcontroller discussion list <> wrote on Thursday, July 24, 2003 6:09 PM: > Led2^=0x01; > Led2=(~led2); // this line generates an error I know it is wrong If you cut and pasted the above and Led2 is a char or int, you might like to try Led2^=0x01; /* Inverts bottom bit of Led2 */ Led2=(~Led2); /* Inverts all bits of Led2- Don't forget CaSe SenSiTIvitY! */ It's hard to give more suggestions without knowing the context- is Led2 a register or a port, or is it a single pin? But any way you look at it, Led2 is not the same as led2, not in ANSI C anyway, and probably not in whatever C you are using, that might have been the source of the error? Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu