| ??? 01/28/03 23:58 Read: times |
#37593 - RE: How to control bit by bit? |
<html>
Here you go (this is for low-level and ASM info, for how to do it in C go to the Support Knowledgebase at www.keil.com and search for bit-addressable, I suppose). When the CPU sees bit-addressed instructions such as SETB, it will use the operand address of the instructions to access the Bit Memory on a bit level. These same bits can be accessed on a byte-by-byte basis by using byte-addressed instructions. Browse the instruction set. Note that MOV can be used to copy bits between bit-addressable memory and the carry bit. JB, JNB, JBC, SETB, and CLR all operate on bit addresses. The CLR mnemonic is also used to for two other opcodes, one to clear the Carry bit and one to clear the accumulator. The 8051 works with opcodes, though, not with mnemonics; the CLR mnemonic used with different addressing modes will result in different opcodes, and therefore different actions. Read the 8052.com tutorial section on Bit Memory; here is a piece: "It is important to note that Bit Memory is really a part of Internal RAM. In fact, the 128 bit variables occupy the 16 bytes of Internal RAM from 20h through 2Fh. Thus, if you write the value FFh to Internal RAM address 20h you?ve effectively set bits 00h through 07h. " <table><tr><td>james</td><td> </td><td> www.jameshinnant.com</td></tr></table> </html> |
| Topic | Author | Date |
| How to control bit by bit? | 01/01/70 00:00 | |
| RE: How to control bit by bit? | 01/01/70 00:00 | |
| RE: How to control bit by bit? | 01/01/70 00:00 | |
| RE: How to control bit by bit? | 01/01/70 00:00 | |
| Still can't understand... | 01/01/70 00:00 | |
| RE: Still can't understand... | 01/01/70 00:00 | |
| Unacceptable Behavor by Forum Member! | 01/01/70 00:00 | |
| RE: Unacceptable Behavor by Non-Member! | 01/01/70 00:00 | |
| RE: Still can't understand... | 01/01/70 00:00 | |
| RE: Still can't understand... | 01/01/70 00:00 | |
| RE: Still can't understand... | 01/01/70 00:00 | |
| RE: How to control bit by bit? | 01/01/70 00:00 | |
RE: How to control bit by bit? | 01/01/70 00:00 |



