; i2c setup
+; NB to generate an address, take PIC_NO bits 4-0 and prepend 10
+; (i.e. all addresses are of the form 10xxxxx)
+
movlb I2C_BUFF_PAGE ; ser BSR=i2c BSR (4)
+common_setup
+
+
+
+
+master_or_slave
+
btfss I2C_CTRL,I2C_MASTER,1 ; test whether PIC is master
goto pic_master_setup ; if so, set up as master
goto pic_slave_setup ; else set up as slave