look at the code. it is function for testing memory but says memory is bad but the memory is new. what is wrong
<code> void MemoryDisplay(void) { unsigned char *Address; unsigned char a,data,temp; char DisBuf[60]; int k,Counter,KeypadType; unsigned long int A;
strcpy(DisBuf,"Enter Address "); disp(DisBuf);
A=0; Counter=0;
while ( (k=getkey()) != ENTER) { if ( k != 255 && k < 0x3A && k>0x2F ) { A = (A*10)+(k & 0x0F); DisBuf[20+Counter] = k; disp(DisBuf); Counter++; } }
Address = (unsigned char *) A;
do { strcpy(DisBuf," "); Counter=0; while (Counter<7) { data = *Address; a = data/16; if (a>9) a=a+7; DisBuf[(Counter*3)] = a+0x30; a = data%16; if (a>9) a=a+7; DisBuf[(Counter*3)+1] = a+0x30; if ( (data>31) && (data<123) ) DisBuf[(Counter*3)+20] = data; else DisBuf[(Counter*3)+20] = ' '; if (Counter != 6) DisBuf[(Counter*3)+2] = ' '; DisBuf[(Counter*3)+21] = ' '; DisBuf[(Counter*3)+22] = ' '; Counter++; Address++; }
disp(DisBuf); k = 0; while ( (k != F1) && (k != F2) ) k = getkey(); } while (k == F1); }
Do you really think that "help" represents a useful summary of your post?
You managed to use the 'pre' and '/pre' tags for your text - they are for source code, not text!
www.danlhenry.com/.../keil_code.png http://www.keil.com/forum/tips.asp
Did you not notice in the preview that your source code is illegible?
"says memory is bad but the memory is new"
And you don't think it possible that "new" memory might, in fact, be faulty?
"it is function for testing memory ..."
Nope. It's a memory display function, not a test function.