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,
- Since it is BSR mode, D7 = '0'.
- Since D4, D5, D6 are not used, assume them to be '0'.
- PC5 has to be selected, hence, D3 = '1', D2 = '0', D1 = '1'.
- 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:
“The ordinary manwe have to face it: it is every bit as true of the ordinary Englishman as of the ordinary Americanis an Anarchist. He wants to do as he likes. He may want his neighbor to be governed, but he himself doesnt want to be governed.”
—George Bernard Shaw (18561950)
“The moral earth, too, is round! The moral earth, too, has its antipodes! The antipodes, too, have their right to exist! There is still another world to be discoveredand more than one! Set sail, you philosophers!”
—Friedrich Nietzsche (18441900)
“The love of their country is with them only a mode of flattering its master; as soon as they think that master can no longer hear, they speak of everything with a frankness which is the more startling because those who listen to it become responsible.”
—Marquis De Custine (17901857)