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 Reply Children
  • ahh ok, i see, well i what i want to do is to set P0.5 as an input and to only transmit when a pulse is received on that pin, i have set pulse_pin (p0.5) as an input using the above, along with p0.1 for other reasons.

    i.e. P0_DIR = 0x22;

    in init() function i have set pulse_pin = 0 then the code for main() is as follows:

    if (pulse_pin = 1)
    { transmitter()
    }

    is this the correct way of 'asking' if a pulse is received, i.e. goes high from a voltage.

    thanks again