// S= I2C Start, P= I2C stop, Repeat S= I2C Stop + Start
// D= data,
// read only accept address + 1 bye, write only accept address + command index + data

S 40 00 S 41 D P // READ INPUT PORT 0 COMMAND, 40 00 is setting index 00h, 41 D is read index data
S 40 06 00 P // WRITE PORT 0 = OUTPUT direction, 1= input direction & high Z, 0= output enable
S 40 02 FF P // WRITE PORT 0 ALL OUTPUT HI COMMAND=> set output Port 0 state= FF

S 40 07 FF P // SETTING PORT 1 = INPUT, same as setting 06h port 0.
S 40 49 FF P // SETTING PORT 1 INTERNAL PULL UP RESISTOR, ‘1’ pull up, ‘0’ pull down
S 40 47 FF P // SETTING PORT 1 pull up/ pull down ENABLE
S 40 4B 00 P // PORT 1 INT MASK DISABLE