Crying, this dot matrix program has been adjusted all afternoon

The C51 platform uses a 16X16 dot matrix to display Chinese characters.
I wrote three characters: drizzle.
One word is displayed on one screen without scrolling the screen, which is a relatively simple way of writing.

void Display(uchar zimo[],uchar row[]){
    
    			  
	int k = 80,ms = 0;
	uchar i = 0;
	uchar newZimo[4];
	for(ms=k;ms > 0;ms--){
    
    
		for(;i<16;i++){
    
    
			 newZimo[0] = ~zimo[(2*i+1)];			   
			 newZimo[1] = ~zimo[(2*i)];			   
			 newZimo[2] = row[(2*i)];
			 newZimo[3] = row[(2*i+1)];
			 inputFun(newZimo);	
			}
	}
	inputFun(cls);
}

At the beginning, the outer for loop was not written, and the words jumped quickly. It's almost like this:

Ah my eyes

Ah my eyes

After adding the outer for loop, either there is no change or the flashing is fast, or the word does not appear directly. All in all, it’s not right. All sorts of tossing in the middle to check data, all kinds of rewriting code, and even changing a crystal...

//救救孩子吧都要疯了

Finally, I accidentally changed the code to this:

void Display(uchar zimo[],uchar row[]){
    
    			 
	int k = 80,ms = 0;
	uchar i = 0;
	uchar newZimo[4];
	for(ms=k;ms > 0;ms--){
    
    
	for(i=0;i<16;i++){
    
    
		 newZimo[0] = ~zimo[(2*i+1)];			 
		 newZimo[1] = ~zimo[(2*i)];			   
		 newZimo[2] = row[(2*i)];
		 newZimo[3] = row[(2*i+1)];
		 inputFun(newZimo);	
		}
	}
	inputFun(cls);
}

He's just fine...okay...
just the starting condition of the inner for loop is missing. A similar wording has been written before, and it has been said that it can be omitted.
I was puzzled, and checked some information, but still to no avail.
Maybe this is metaphysics, right?
I will continue to pay attention to this manifestation, looking for answers.

Guess you like

Origin blog.csdn.net/codemokey/article/details/113619182