Well I've spent a few hours working on this over the weekend, and I've made good progress (for me) with communicating with the sensor. I have a PIC Serial LCD (20x4) attached to a PIC12F683, which has the BMP085 attached to GPIO.0 (clock) and GPIO.1(data).

So far I can see the inbuilt temperature sensor value changing when I put a warm finger on the sensor, and also read out the eleven 16bit calibration parameters and display them (I think).

I'm worried about two things.
One is if I have the MSB and LSB of the calibration data in the right order when I'm storing them and then again using them. I not convinced the numbers look right on the LCD. The PBP manual I find confuses me somewhat when they talk about storing the LSB first in a word sized array of the i2c device (i2cread command description).

The second is converting this math to PBP, given that the values of some seem to be signed and results of some operations are going to be 32bit size (unless I don't understand it at all, which is possible).
To convert the raw temperature result UT to Deg C (T) is
X1 = (UT - AC6) * AC5 / 2^15
X2 = MC * 2^11 / (X1 + MD)
B5 = X1 + X2
T = (B5 + 8) / 2^4

I'd love some help with some code to show how this can be done in PBP.
Anybody ?

Cheers,
Martin

Code:
'PIC 12F683 port/pin allocations
'-------------------------------
'GPIO.0/Pin 7 = I2C SCL clock
'GPIO.1/Pin 6 = I2C SDA data
'GPIO.2/Pin 5 = spare
'GPIO.3/Pin 4 = spare
'GPIO.4/Pin 3 = LED
'GPIO.5/Pin 2 = Serial TX

'-----------------------
' PIC Defines
' ===========
'Config bits set to INTERNAL OSC, Watch dog ON, Power up timer ON, Master Clear NOT used, BrownOut protection ON, 
@ Device  pic12f683, intrc_osc, wdt_on, pwrt_on, mclr_off, bod_on ;Config switches, different from PBP default
'@ __Config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF   ;USING MPASM ONLY

    Define Osc 4 '4Mhz clock used. Note - Set PIC config fuses on programmer to use Internal RC OSC
    
    Include "modedefs.bas"          ' Include serial modes

' Define some constants if needed
        
' Software Defines
    Cal_table   var word[11]         '11 word array to store calibration data
    Temp_Var    var byte             'temp variable 
    Temp_Var2   var Word	         'temp variable 
    i2c_Reg     var Byte             'variable for target i2c register address
    
    CPIN        var     GPIO.0       ' I2C clock pin 
    DPIN        var     GPIO.1       ' I2C data pin
    SO          Var     GPIO.5        'Serial out pin
    LED         var     GPIO.4        'Indicator LED, via 500ohm to +3.3V
    
'Alias's for calibration data in the sensor to match the Bosch paramater list names
    AC1     var     Cal_table[0]     '
    AC2     var     Cal_table[1]     'BMP085 has 11 16bit values stored in EEPROM
    AC3     var     Cal_table[2]     'First byte is at $AA last at $BF
    AC4     var     Cal_table[3]     'Lowbyte is MSB, Highbyte is LSB
    AC5     var     Cal_table[4]     'some values are signed (not AC4, AC5, AC6)
    AC6     var     Cal_table[5]    
    B1      var     Cal_table[6]
    B2      var     Cal_table[7]
    MB      var     Cal_table[8]
    MC      var     Cal_table[9]    
    MD      var     Cal_table[10]    
    
' Initialise Processor - check for each PIC type either 12F629 or 12F675
' --------------------
    VRCON.7 = %0    'Comparator voltage reference OFF
    CMCON0 = %111   'Comparator inputs to OFF, all pins normal I/O
    ANSEL = 0       'Turn off al AD's     rem out for PIC12F629, use for PIC12F675

' Set initial state of GPIO port pins as Input or Output

    TRISIO.0 = 0    'Input(0 = output, 1 = Input)
    TRISIO.1 = 0    '
    TRISIO.2 = 1    '
    TRISIO.3 = 0    '
    TRISIO.4 = 0    '
    TRISIO.5 = 1    '

' PIC initialization code

        Low LED     'LED on
        pause 500
        High LED    'LED off
 
        Serout SO,N2400,[$FE,$01]               ' Clear LCD & home LCD cursor.
        pause 10                                ' wait for LCD to catch up
        Serout SO,N2400,["   FrSky Vario    "]  ' Serial print 
        Serout SO,N2400,[$FE,$C0]               ' Shift cursor to line2
        Serout SO,N2400,[" development jig  "]  ' Serial print 
        Pause 3000
        
        i2c_Reg =$AA                            'Start address of calibration data
        I2CREAD DPIN,CPIN,$EF,I2C_REG,[STR Cal_table\11],read_error1  'Read 11 words out of sensor
        Serout SO,N2400,[$FE,$01]             ' Clear LCD & home LCD cursor. 
        Pause 10                              ' wait for LCD to catch up
Main:  
        Serout SO,N2400,[$FE,$02]             'home LCD cursor.                           
                
        i2c_Reg = $F4                         '$F4 is the control register address
        I2CWRITE DPIN,CPIN,$EE,I2C_REG,[$2E]  ' Write $2E to set temperature conversion 
        Pause 10                              ' Delay 10ms after each write
 
        i2c_Reg = $F6                       '$F6 is the result register MSB
        I2CREAD DPIN,CPIN,$EF,I2C_REG,[Temp_Var2],read_error  'Read temperature MSB, LSB.

        Serout SO,N2400,[#Temp_Var2," "]       'Send Word size number to LCD

'lets see whats in the cal data array for a checking math   
        Serout SO,N2400,[$FE,$C0]               ' Shift cursor to line2
        Serout SO,N2400,[#AC1," ",#AC2," ",#AC3]
        Serout SO,N2400,[$FE,$94]               ' Shift cursor to line3
        Serout SO,N2400,[#AC4," ",#AC5," ",#AC6]
        Serout SO,N2400,[$FE,$D4]
        Serout SO,N2400,[#B1," ",#B2," ",#MB]
'        ," ",#MC," ",#MD]                  '
        pause 1000
        Toggle LED
        Goto main
        
Read_error:
        Serout SO,N2400,[$FE,$01]             ' Clear LCD & home LCD cursor. 
        Pause 10                              ' wait for LCD to catch up
        Serout SO,N2400,["i2c bus read error"]       '        
        pause 250        
       
        Toggle LED
        Goto main
         
Read_error1:
        Serout SO,N2400,[$FE,$01]             ' Clear LCD & home LCD cursor. 
        Pause 10 
        Serout SO,N2400,["i2c cal read error "]       '        
        
End