Rev 3074 Rev 3375
Line 52... Line 52...
52   52  
53 spi_read(0x00); 53 spi_read(0x00);
54 output_high(CSN_SPI); 54 output_high(CSN_SPI);
55 55
56 // translate to floating point number 56 // translate to floating point number
-   57  
-   58 printf("%d %d %d %d %d %d %d %d ",a0_MSB, a0_LSB,b1_MSB, b1_LSB, b2_MSB, b2_LSB, c12_MSB, c12_LSB);
57 59
58 a0 = ((unsigned int16) a0_MSB << 5) + (a0_LSB >> 3) + (a0_LSB & 0x07)/8.0; 60 a0 = ((unsigned int16) a0_MSB << 5) + (a0_LSB >> 3) + (a0_LSB & 0x07)/8.0;
59 b1 = ((((b1_MSB & 0x1F) * 0x100) + b1_LSB) / 8192.0) - 3; 61 b1 = ((((b1_MSB & 0x1F) * 0x100) + b1_LSB) / 8192.0) - 3;
60 b2 = ((((unsigned int16) (b2_MSB - 0x80) << 8) + b2_LSB)/ 16384.0) - 2; 62 b2 = ((((unsigned int16) (b2_MSB - 0x80) << 8) + b2_LSB)/ 16384.0) - 2;
61 c12 =(((c12_MSB * 0x100) + c12_LSB)/16777216.0); 63 c12 =(((c12_MSB * 0x100) + c12_LSB)/16777216.0);