Electronic – this array-like notation of registers in datasheets

datasheetregistersensor

I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$register\text{_}name[a:b]$$ where a, b are integers. For example, on page 13 "Enabling/disabling the temperature measurement and oversampling setting are selected through the osrs_t[2:0] bits in control register 0xF4".

How to interpret this notation?

Best Answer

Those denote the bits within the register.

The bits are number 7, 6, 5, 4, 3, 2, 1, 0 so register 0xF4 is build up:

Control register 0xF4 bits: 7 6 5 4 3 2 1 0
                                      <--->
                                   osrs_t bits

In <----> you can set the temperature measurement and oversampling setting (osrs_t).

In Table 5 of page 13 you can see exactly the values and their meaning for these 3 bits:

Datasheet excerpt

If osrs_t would be stored in the MSB first 3 bits it would be mentioned as osrs_t[7:5], and if the entire byte is used, normally the [] will not be shown.