From 526af5a7617e8d900c8923947ef1300bb6e8e1f6 Mon Sep 17 00:00:00 2001 From: ceb Date: Mon, 7 Feb 2005 00:18:00 +0000 Subject: [PATCH] i2c update --- cebpic/i2c-test.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cebpic/i2c-test.asm b/cebpic/i2c-test.asm index 1b7f7ce..6afaf07 100644 --- a/cebpic/i2c-test.asm +++ b/cebpic/i2c-test.asm @@ -154,8 +154,18 @@ initialise ; 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 -- 2.30.2