??? 05/14/09 15:12 Read: times |
#165343 - Got your point Responding to: ???'s previous message |
Hi Rita,
Now it is clear that you want run your code on MCS51. 1. Do you have Keil Compiler installed and running on your PC? 2. Have you tried my code that I posted previously. What was the result? What did you see on the screen? I will repeat the process here. 1. Open a new project in Keil, and complete the formalities of starting a new project. 2. Create/Open the Source file. And this should be the code in that file: #include <AT89X52.h> #define NUMPAT 8 #define NUMIN 2 double Input[NUMPAT+1][NUMIN+1]; void main (void) { unsigned char i,j, k; // Initialize the array here k=1; for (i=0; i<NUMPAT+1; i++) { for (j=0; j<NUMIN+1; j++) { Input[i][j]=k; k++; } } // Write each element of 2 dimensional array onto port P1 of MCS51 for (i=0; i<NUMPAT+1; i++) { for (j=0; j<NUMIN+1; j++) P1= Input[i][j]; } } Copy-paste the entire code in that file. 3. Compile this file and check for any errors...there are No errors when I compile it on my PC. 4. Start the debugger by pressing <Ctrl-F5> 5. F-10 key is the key for single stepping. 6. Open P1 by using Peripherals->I/O Ports-> P1. This will open up a small window,showing the status of Port P1. 7. Press F-10 repeatedly, till you come to the instruction where you write the data on the port P1. 8. Now press F-10 key once and see the changes in the window of Port P1. It is the data that we had initialized into the array. press F-10 repeatedly to see the rest of the array contents. 9. Let me know whether you have achieved this. Now my reply to you: Rita Singh said:
i agreed with u..i am using the header files of the include folder of tc..
I don't think you can do that in Keil. If it did not give errors, then it is well and good. Rita Singh said:
basically u can see in my code their r 3 things.. 1)input 2)target 3)output You are Not taking inputs, but you are initializing those arrrays with some random numbers. Atleast that is what I could understand from your first post. I doubt you can do that in Keil. Instead of this, initialize it with some number that is incremented in every loop; like I have done in my code. In your code you are processing the data...and that I did not clearly understand...sorry, I do not have time to reverse engineer what processing you are doing. But again you are doing something with random numbers here...again I am doubtful you can do that in Keil. Rita Singh said:
I want a graph specifially of target and output ..showing that how much target is acheived by the output of our code..specifically on microcontroller 8051..i am using keil because it provides the facility to have the graph using static analyser.. This is confusing. 1.Do you mean it is "Logic Analyzer" or the "Performance Analyzer"? 2.What is "target" and what is "output". Do you mean target as "something that the code" is supposed to do? or do you mean the contents of array (after processing) should be seen on the graph? 3.Do you mean "target" is something that this code is supposed do and it is to be seen on the graph, and "output" is something (that is a percentage of "target") of the data? Rita Singh said:
..but their is no compulsion like that i have to work on keil..if u know any other software which will give me environment of 8051 microcontroller and provide me the output directly or with some changes in my c code.. I think Keil is enough for your requirement. But there is still many things to clear, you will need a lot of patience and a lot to study. Bye from Kiran V Sutar, Mumbai, INDIA. |