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.
"in the datasheet it says..."
Standard 'C' has no way of dealing with individual bits in a byte - so that has to be a compiler-specific extension. What compiler is the datasheet referring to?
For Keil C51, you have to define "P0_DIR" as an sfr, and then define bit 1 within that SFR as an sbit.
Or you can define the sbit directly.
sfr and sbit are Keil-specific language extensions - look them up in the C51 Manual.
or take a look at Keil's header file for this device:
http://www.keil.com/dd/chip/3605.htm
View all questions in Keil forum