Programming LPC43xx microcontroller using c

Thread Starter

Divya tcs

Joined Oct 30, 2013
1
Hi
I want to access only one bit of a register. I know the method how to do it from the same forum but I want to know whether this operation affects the whole register i.e if im writing a program to read one bit in a register, does it read the whole register and fetches that particular bit for me or it reads only that bit without even reading the whole register??

Thanks in advance, Hope my question is clear. If not please post.
 

MrChips

Joined Oct 2, 2009
30,707
It depends on two things.
1) Does the processor have bit set/clear/branch operations?
2) Does the C compiler make use of these native instructions?

One way of finding out is to disassemble the C code.

If you are running a respectable compiler I would expect both answers to be yes.
 
Top