How to set SDA= p0.25;and SCL=P0.26 default pin configration.
How to set SDA= p0.25;and SCL=P0.26 default pin configration.
#define TWI0_CONFIG_FREQUENCY NRF_TWI_FREQ_100K
#define TWI0_CONFIG_SCL 0x1b
#define TWI0_CONFIG_SDA 0x1a
Is this PSEL_xx register configuration??
0x1b and 0x1a are bit selection in PSEL.SCA and PSEL.SDA ???
if these are correct, then tell me how they get write this exact vslues on the register?
The PS (V1.4, chapter 49.8.6) leaves no ambiguity here:
"PSELSCL [0..31] Pin number configuration for TWI SCL signal".
Any experienced programmer can calculate the decimal pin number from those simple hex values - and everybody else just uses windows calculator in programmer mode.
SCL is P0.26, SDA is P0.27 as shown here.
Dunno why the values are encoded in hex in your case. Decimal values work fine here, and would match the P0.xx values from the PS.