Current location - Education and Training Encyclopedia - Graduation thesis - 5 1 MCU I2C bus reads a byte if (SDA = =1) RETC = RETC+1; What do you mean?
5 1 MCU I2C bus reads a byte if (SDA = =1) RETC = RETC+1; What do you mean?
retc = 0; //The variable retc returns to zero

retc = retc & lt& lt 1; //Variable moves to the left

if(SDA = = 1)retc = retc+ 1; //This sentence is actually to receive one bit, because the previous sentence is shifted to the left, so this sentence is about to receive the next bit, which is shifted to the left, and the lowest bit is 0. If the receiving pin is 0, it is 0. If it is 1, the lowest bit of the rec variable should be changed to 1. In the program, it is actually changed to 1.