jkougoulos / lowpower-i2c-sensor

Another ATMega328PB based wireless sensor, designed for low power consumption
0 stars 0 forks source link

4Mhz external clock addition #2

Open jkougoulos opened 6 years ago

jkougoulos commented 6 years ago

1Mhz is too slow, 8 Mhz requires higher BODLEVEL detection and a lot of power. Consider using 4Mhz external clock as a compromise

Datasheet (pg 334, paragraph 33.4 show 2.4v is safe for 8Mhz, 4Mhz can go down to 1.8v)

jkougoulos commented 6 years ago

We lose a lot of time due to 1Mhz in compensation calculation for BME280. Perhaps a different sensor requires less CPU resources. Moreover SPI is clocked at 0.5Mhz and I2C at 62.5khz due to the slow CPU clock, adding furter latency. Overall, around 11-12ms is the required time for taking measurement, transmitting and blinking the LED. The rest (so far ~32ms) are spent in I2C, SPI I/O and calculations.