What is this array-like notation of registers in datasheets?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$registertext_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?
sensor datasheet register
 |Â
show 1 more comment
up vote
2
down vote
favorite
I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$registertext_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?
sensor datasheet register
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
2
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00
 |Â
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$registertext_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?
sensor datasheet register
I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$registertext_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?
sensor datasheet register
asked Aug 9 at 11:17
Turkhan Badalov
1185
1185
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
2
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00
 |Â
show 1 more comment
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
2
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
2
2
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
10
down vote
accepted
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:
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.
add a comment |Â
up vote
1
down vote
It very likely means bits. osrs_t[2:0]
would mean selected through bits 0, 1 and 2.
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
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:
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.
add a comment |Â
up vote
10
down vote
accepted
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:
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.
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
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:
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.
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:
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.
edited Aug 9 at 11:26
answered Aug 9 at 11:21


Michel Keijzers
4,62742149
4,62742149
add a comment |Â
add a comment |Â
up vote
1
down vote
It very likely means bits. osrs_t[2:0]
would mean selected through bits 0, 1 and 2.
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
add a comment |Â
up vote
1
down vote
It very likely means bits. osrs_t[2:0]
would mean selected through bits 0, 1 and 2.
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
add a comment |Â
up vote
1
down vote
up vote
1
down vote
It very likely means bits. osrs_t[2:0]
would mean selected through bits 0, 1 and 2.
It very likely means bits. osrs_t[2:0]
would mean selected through bits 0, 1 and 2.
answered Aug 9 at 11:20
Lundin
3,302929
3,302929
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
add a comment |Â
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
It is not "likely", it is with 110% confidence.
– Ale..chenski
Aug 9 at 18:27
1
1
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@AliChen: Unless it's an IBM document. Then it means bits 31, 30, and 29 or bits 63, 62, and 61. ;-)
– R..
Aug 9 at 18:44
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.., that's probably why their hardware is out of business :-(
– Ale..chenski
Aug 9 at 20:09
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
@R.. I did actually have the dysfunctional PowerPC hardware manuals in mind when I wrote "very likely".
– Lundin
Aug 10 at 6:34
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f390148%2fwhat-is-this-array-like-notation-of-registers-in-datasheets%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
In x86 microcode descriptions we would say its bits 2, 1 and 0. Might be the same in their notation.
– PlasmaHH
Aug 9 at 11:19
@PlasmaHH, from left to right? So [a:b] means b, b+1, ..., a bits?
– Turkhan Badalov
Aug 9 at 11:20
2
Bit 2:0 means bits 0 to 2. There's no "left and right", there's the LSB which is bit 0 and then count from there.
– Lundin
Aug 9 at 11:21
These are the notations borrowed from the chip design language, Verilog or VHDL. Marketing and technical writers just use them for simplicity and convenience.
– Ale..chenski
Aug 9 at 16:56
@AliChen - did you know that VHDL was originally conceived as a way of describing the behaviour of existing chips, not as a way of designing them? This is precisely the kind of application VHDL was originally supposed to be used for.
– Jules
Aug 9 at 18:00