mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
78 lines
1.5 KiB
Plaintext
78 lines
1.5 KiB
Plaintext
|
|
http://forum.arduino.cc/index.php?topic=272402.msg1923962#new
|
|
|
|
TODO's
|
|
- none
|
|
DHT11 blauwe testen ....
|
|
|
|
DONE
|
|
======================
|
|
- there are many delay()'s still in the library and these should be removed if possible or at least minimized.
|
|
- the PRE1.0 Arduino support needs still to be implemented. Or removed completely.
|
|
- test test test test test and ....
|
|
|
|
Remark Erni
|
|
============
|
|
int64_t offset = (unsigned long)C[2] * 65536L + (C[4] * dT ) / 128L;
|
|
|
|
|
|
OPtimiize
|
|
============
|
|
uint16_t C[8] = { 80, 53513, 56427, 32594, 31335, 31612, 27894, 45785};
|
|
uint32_t D1 = 7909856L;
|
|
uint32_t D2 = 8246240L;
|
|
|
|
|
|
int32_t dT = D2 - C[5] * 256L;
|
|
int32_t temp = 2000 + (dT * C[6])/8388608L;
|
|
|
|
int64_t offset = C[2] * 65536L+ (C[4] * dT ) / 128L;
|
|
int64_t sens = C[1] * 32768L + (C[3] * dT ) / 256L;
|
|
int32_t P = ((D1 * sens)/2097152L - offset) / 32768L;
|
|
|
|
|
|
Port open
|
|
MS5611 test version: 0.0.00
|
|
reset: 0
|
|
0 50 80
|
|
0 D109 53513
|
|
0 DC6B 56427
|
|
0 7F52 32594
|
|
0 7A67 31335
|
|
0 7B7C 31612
|
|
0 6CF6 27894
|
|
0 B2D9 45785
|
|
convD1: 0
|
|
7909856
|
|
convD2: 0
|
|
8246240
|
|
|
|
|
|
float is 40% faster 168 versus 296 == 130 uSec.
|
|
test sketch size, RAM
|
|
int64 => 7220, 476
|
|
float => 6522, 476
|
|
|
|
==> scheelt 700 bytes.
|
|
|
|
|
|
dT = D2 - C[5] * 256L;
|
|
int16_t T2 = 2000 + (dT * C[6]) /8388608L;
|
|
|
|
float offset2 = C[2] * 65536.0 + (C[4] * dT ) / 128.0;
|
|
float sens2 = C[1] * 32768.0 + (C[3] * dT ) / 256.0;
|
|
uint32_t P2 = ((D1 * sens2)/2097152.0 - offset2) / 32768.0;
|
|
|
|
|
|
Start
|
|
296
|
|
153568
|
|
1999
|
|
89177
|
|
|
|
168
|
|
153568
|
|
1999
|
|
89177
|
|
|