Create i2c.asm

; BitBang I2C Routines
;
;--------------------------------------------------------------------------------
;
; Copyright (c) 2012 by Steve Botts, KD6VKF.  All rights reserved.
; Modified for WWVB CLOCK (4MHZ) 10/20/12 
; Original March 23, 2001
;
;--------------------------------------------------------------------------------
;
; This is a set of I2C routines.  RA2 is SCL and RA3 is SDA.  Registers that must
; be defined include:
;
; BitCount (bit index)
; OutByte (Data to be transmitted should be put in this register before Transmit is called)
; InByte (Data received is left in this register following the Receive call)
;
; These routines run at an approximate clock rate of 65 kHz for a 10 MHz PIC oscillator.
; The spec for I2C lists a maximum of 100 kHz or 400 kHz for the fast bus devices.
; appropriate modifications to Delay25 should be made to raise the clock rate.  
;
; This assumes the SDA and SCL lines are pulled high, 1 = input (Hi ZO) and 0=OUTPUT 0
; to pull the line low.  This uses both the TRIsB and PORTB
;----------------------------------------------------------------------------------