Intel 8255 - Bit Set/reset (BSR) Mode

Bit Set/reset (BSR) Mode

The Bit Set/Reset (BSR) mode is applicable to port C only. Each line of port C (PC0 - PC7) can be set/reset by suitably loading the control word register. BSR mode and I/O mode are independent and selection of BSR mode does not affect the operation of other ports in I/O mode.

  • D7 bit is always 0 for BSR mode.
  • Bits D6, D5 and D4 are don't care bits.
  • Bits D3, D2 and D1 are used to select the pin of Port C.
  • Bit D0 is used to set/reset the selected pin of Port C.

Selection of port C pin is determined as follows:

B3 B2 B1 Bit/pin of port C selected
0 0 0 PC0
0 0 1 PC1
0 1 0 PC2
0 1 1 PC3
1 0 0 PC4
1 0 1 PC5
1 1 0 PC6
1 1 1 PC7

As an example, if it is needed that PC5 be set, then in the control word,

  1. Since it is BSR mode, D7 = '0'.
  2. Since D4, D5, D6 are not used, assume them to be '0'.
  3. PC5 has to be selected, hence, D3 = '1', D2 = '0', D1 = '1'.
  4. PC5 has to be set, hence, D0 = '1'.

Thus, as per the above values, 0B (Hex) will be loaded into the Control Word Register (CWR).

D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 1 0 1 1

Read more about this topic:  Intel 8255

Famous quotes containing the words bit, set and/or mode:

    This dog and man at first were friends;
    But when a pique began,
    The dog, to gain some private ends,
    Went mad and bit the man.
    Oliver Goldsmith (1730?–1774)

    We cannot set aside an hour for discussion with our children and hope that it will be a time of deep encounter. The special moments of intimacy are more likely to happen while baking a cake together, or playing hide and seek, or just sitting in the waiting room of the orthodontist.
    Neil Kurshan (20th century)

    There are a thousand hacking at the branches of evil to one who is striking at the root, and it may be that he who bestows the largest amount of time and money on the needy is doing the most by his mode of life to produce that misery which he strives in vain to relieve.
    Henry David Thoreau (1817–1862)