Need help in serial communication using SBUF register using 89C51 !!!

Actually I want to transmit 3 bits serially using AT89C51 micro-controller.I have written the code in ".c" file, using c programming trying to transmit the bits serially using SBUF register.As the SBUF register is the single register available in serial programming of 89C51, it is not updating its value. The bit which is first transmitted is only repeated in the next 2 bits, it is not being updated and then transmitted.So I want guidance regarding sending 3 bits(number / integer) using serial communication( with SBUF register).Following is the code I have written,#includevoid decimal(); void MSB(); void MIDDLE(); void LSB();void main() { while(1) { decimal(); MSB(); MIDDLE(); LSB(); } }void decimal() { unsigned char x,bin,d1,d2,d3; bin = Data_Bus; x = bin /10; d1 = bin %10; d2 = x %10; d3 = x/10; }void MSB() { unsigned char d1,a; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; a = d1 +0x30; SBUF = a; while(TI==0); TI = 0; }void MIDDLE() { unsigned char d2,b; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; b= d2 + 0x30; SBUF = b; while(TI==0); TI = 0; } void LSB() { unsigned char d3,c; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; c= d3 + 0x30; SBUF = c; while(TI==0); TI = 0; }

Asked by 140170117013 4 minutes ago

How much temperature do it created by 10w, 20w, 50w laser or laser diod?

I don't know what is laser or laser diod. I want to know about the temperature mainly.

Asked by rinipakhe11 5 hours ago