What is this array-like notation of registers in datasheets?

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question




















  • 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
















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?







share|improve this question




















  • 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












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?







share|improve this question












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?









share|improve this question











share|improve this question




share|improve this question










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
















  • 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










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:



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.






share|improve this answer





























    up vote
    1
    down vote













    It very likely means bits. osrs_t[2:0] would mean selected through bits 0, 1 and 2.






    share|improve this answer




















    • 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










    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("schematics", function ()
    StackExchange.schematics.init();
    );
    , "cicuitlab");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "135"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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:



    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.






    share|improve this answer


























      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:



      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.






      share|improve this answer
























        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:



        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.






        share|improve this 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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 9 at 11:26

























        answered Aug 9 at 11:21









        Michel Keijzers

        4,62742149




        4,62742149






















            up vote
            1
            down vote













            It very likely means bits. osrs_t[2:0] would mean selected through bits 0, 1 and 2.






            share|improve this answer




















            • 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














            up vote
            1
            down vote













            It very likely means bits. osrs_t[2:0] would mean selected through bits 0, 1 and 2.






            share|improve this answer




















            • 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












            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.






            share|improve this answer












            It very likely means bits. osrs_t[2:0] would mean selected through bits 0, 1 and 2.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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
















            • 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

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery