Thanks Dave - good to see a concrete example.I saw the hint about DDRx being PORTx -1 and certainly in iotnx5.h there are definitions:#define DDRB _SFR_IO8(0x17)#define PORTB _SFR_IO8(0x18)