Hi All,
I am trying to read and write to external memory. and I want to read data from external memory and output to P0
now I have a few questions.
1. do I need to set the ALE, EA, RD, and WR bits? 2. Following is my code, and it seem not to do anything, something wrong?
main() { char xdata *a_Ptr=0x8000; char myX;
while(1) { for(i=0;i<=15;i++) { myX=*a_Ptr; P0=myX; } } }
since my external memory already has data in it, I added a loop to try to read the data and output from P0, but the output is not the data in the flash memory. instead, it output the numbers from 0 to 15. what could be the problem?