We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
my code
#include <REGX51.H> void delay(unsigned int i) { unsigned int j,k; for(j=0;j<=i;j++) { for (k=0;k<=1275;k++); } } void main (void) { unsigned char mybyte; P1=0xff; mybyte=P1; delay(250); P2=mybyte; }
help me sir plz
Why are you spamming the forum with identical posts?
I could have given an answer mentioning a number of problems with my code. But I don't, since you assumed that other forum readers should ignore their normal time zones or should ignore that it is a weekend just to come jumping in and help you.
Why are you spamming the forum with identical posts? ... that have no bearing on your problem. The 'code' ('code' in quotes, because nothing without comments deserve the name 'code') will not, in itself, create the problem you state.
Erik
Not being a C51 guy, I don't know if it is related, but the OP is missing an infinite loop in his main function...