Had to change to SW TX then it works....well sort of. The I2C reads the compass and the data is stored in the array and tehn transmitted....however the OSD compass heading displays garbage (643, 888, 127 random stuff).
Changed the chip set up to
Include "modedefs.bas"
define OSC 20
Define I2C_SLOW 1
APFCON0 = %11100000 'Set RB pins to SCL1 and SDA 1
APFCON1 = 1 ' TX on RB5
CM1CON0 = 0 ' COMPARATORS OFF
CM1CON1 =0
CM2CON0 = 0 ' COMPARATORS OFF
CM2CON1 =0
CPSCON0 = 0 'CAPACTIVE SENSE MODULE OFF
ANSELA = 0 'turn off analog port A
ANSELB = 0 'turn off analog port B
TRISA= %11111111
TRISB= %11111111
Bookmarks