This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can map some bit in a array

Dear all,

I want to access some continus bit,let me can modify the value,such as,
for(i = 0 ; i < 10 ; i++)
{
bit[i] = ?;
}

but you know,the bit var cann't build as a array in keil c51,but build some boolean var with byte will speed down the MCU and more code,Who can give me a good advice and a way,Thanks in advance.

Parents
  • Thansk all friend very much,Now I see,Though the bitaddress var is a good way to save the code area and speed up the MCU perfomance,but because the 8051's limit,The bitaddress var have no index register like the byteaddress var,So the pointer cann't assign to bit address var,and struct and union is also,the byte transfer is the only select,and I had test,Keil had trans the byte mode only 2 instruction (0) or 3instruction(1).

    Last word,Sorry my poor english.

Reply
  • Thansk all friend very much,Now I see,Though the bitaddress var is a good way to save the code area and speed up the MCU perfomance,but because the 8051's limit,The bitaddress var have no index register like the byteaddress var,So the pointer cann't assign to bit address var,and struct and union is also,the byte transfer is the only select,and I had test,Keil had trans the byte mode only 2 instruction (0) or 3instruction(1).

    Last word,Sorry my poor english.

Children
No data