This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assigning pin status

Hi using the nrf24e1, in the datasheet it says to set a pin on a particular port to an input or output for example port 0 pin 1 to output:

P0_DIR.1 = 0;

but this doesnt seem to be recognised in keil. what is the correct code for this?

cheers.

Parents
  • "cant understand how it is doing what it says its doing??"

    Which bit don't you understand - the 'C' syntax, or the comment.

    The 'C' syntax is setting bit-1 in P0_DIR - but your original post was, apparently trying to clear that bit.

    Whether clearing that bit in that register does actually set P0.1 (RxD) to be an input is something you'll have to check in the Datasheet.

    Comments can, of course, be wrong...

Reply
  • "cant understand how it is doing what it says its doing??"

    Which bit don't you understand - the 'C' syntax, or the comment.

    The 'C' syntax is setting bit-1 in P0_DIR - but your original post was, apparently trying to clear that bit.

    Whether clearing that bit in that register does actually set P0.1 (RxD) to be an input is something you'll have to check in the Datasheet.

    Comments can, of course, be wrong...

Children