We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
are 8051 derivatives bit addressable on the ports like PICs are? if so how do you write this in c? if i waned to address P1.4 would i write P1=P1|0x10 or am i way off the mark?
In short: P1^1 = 1;
Actually, afaik a caret (^) is only considered a bit-position operator when used in an sbit definition. In all other places, it is considered an XOR operator, so the line above will generate the appropriate error.