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

accessing bit of any variable (using bdata) : for spi feature

hello everybody
i think to implement spi feature using 8051
so i use shift register

for accessing individual bit i copy that variable in bit addressable memory area using bdata data type

can any one help me how i copy individual bit to port 0_1 one after another by using bdata

Parents
  • One typically does not use bdata or bit-addressable memory for this type of operation because it would require duplication of statements for MOSI bit copy and clocking SCK for each bit output. Instead one typically uses a bit output loop, ANDing the output data against a shifting bit mask or ANDing a fixed bit mask agains shifting output data, and clocking out the result.

Reply
  • One typically does not use bdata or bit-addressable memory for this type of operation because it would require duplication of statements for MOSI bit copy and clocking SCK for each bit output. Instead one typically uses a bit output loop, ANDing the output data against a shifting bit mask or ANDing a fixed bit mask agains shifting output data, and clocking out the result.

Children
No data