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; } } /**************************************/
Hanging where, how. How did you detect this? What will your CPU do once your for() loop is finished and it falls off the end of main()?
Dear Hans, Regards, I have received only '0' in hyperterminal is this show somethings ? I think the loop runs once and cpu hangs . Is my cpu (W78E65P from winbond) important ? All The Best Majid
I think the loop runs once and cpu hangs . You think right. Now take you darn PC hat off and put on a '51 hat. Ok, now, with the right hat on, you know why. Erik