Regards all, This codes generates a hang on cpu . Please kindly take this & guid me : #include <w78e65.H> #include <stdio.h> main() { unsigned char i; TMOD=0x20; SCON=0x52; TH1=0xfa; TR1=1; for(i=0;i<=255;i++) { printf("%bd",i); P2=i; } } /**************************************/
I would suggest adding a delay inside the loop, enough to allow for the uart to transmit the byte before writing a new value into sbuf To what purpose, what is wrong with testing RI? Erik
For starters... it wouldn't work. Testing "TI" might though. :)
OOPS Erik