Programming LPC43xx microcontroller using c

Discussion in 'Embedded Systems and Microcontrollers' started by Divya tcs, Oct 30, 2013.

  1. Divya tcs

    Thread Starter New Member

    Oct 30, 2013
    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.
  2. MrChips


    Oct 2, 2009
    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.
    absf likes this.