bitadressable registers

Discussion in 'Embedded Systems and Microcontrollers' started by elamparithi, Nov 10, 2009.

  1. elamparithi

    Thread Starter New Member

    Sep 24, 2009
    4
    0
    Can one explain about bit addressable registers???
    :confused::confused:
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    It would help if you stated what microcontroller this is related to.
    On the PIC chips
    BSF file, bit (0-7)
    sets the bit in file to 1
    BCF clears the bit to 0
    All other bits are unaffected.

    BTFSC file, bit (0-7)
    tests the bit and skips the next instruction if it is 0
    BTFSS skips the next instruction if it is 1
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,175
    1,798
    The 74xx259 is a bit addressable register. It has 8 output bits which can be modified one at a time. Check out a typical datasheet.

    http://focus.ti.com/lit/ds/symlink/sn74hc259.pdf

    In order to work as an addressable register CLR* should be high and G* should be low. The 1-bit data comes from the D input and the bit address is on the [S2,S1,S0] lines. Is that what you were looking for?
     
  4. elamparithi

    Thread Starter New Member

    Sep 24, 2009
    4
    0
    please tell about the bit addressable registers in 8251 mircocontroller..........i cant even understand the meaning or definition i searched the web..but i didnt get the answers....please tell wat is the basic thing behind the bit addressable registers...
     
    Last edited: Nov 10, 2009
  5. Papabravo

    Expert

    Feb 24, 2006
    10,175
    1,798
    I see. OK some of the registers in RAM and some of the registers in the Special Function Register space are bit addressable. What this means is that you can manipulate the indvidual bits in those register with instructions that read, write, set, clear, and branch on those bits. The number of addressable bits is fixed in the architecture and only those registers that are "bit-addressable" support these operations.
     
  6. elamparithi

    Thread Starter New Member

    Sep 24, 2009
    4
    0

    A bit in registers for special function:confused:... how is this :confused:done please tell....:confused:
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,175
    1,798
    In the 8051 architecture the internal addresses in the range [0x00..0x7F] are implemented with Random Access Memory (RAM). You can read them and write them either directly or indirectly.

    Internal addresses in the range [0x80-0xFF] have two different things located there. If the address is referenced indirectly then the data goes to or comes from RAM (see paragraph above). If on the other hand the refernece is direct, that is contained within the instruction, then the data goes to and comes from Special Function Registers (SFR). SFRs do not work like memory they may refer to different things when they are read and written. For example the serial port buffer register, SBUF has a transmit register for write data and a receive register for incoming data. It is unlikely that you could ever read the last value that had been written unless you had made an external loopback.

    How does an addressable bit operation work? Well the entire register is read by the CPU, the bit is modified and the entire register is written back. This is called a READ-MODIFY-WRITE instruction. The only SFR registers which are bit addressable are the ones with 3 zeros in the low order bits of their address. Was that the answer you were looking for?
     
Loading...