6. The Target dialog box will appear. Under the Device tab, choose AT89C2051. Click Finish.

7. You have just created a project file. The next thing that you need to do is to create a C file. Go to the menu bar and click File->New.

8. Choose C Files as the document type.

9. A C file editor is now open. On this editor, you can write any C code you want. On the editor type the following:
#include <reg51.h>void main(void) { P1=0xFF;while(1); }
10. Click File->Save as…

11. Save the C file using the file name that you wish.

12. You just created and saved a C file. Now, you need to include the C file in the project that you just created. Go to the menu bar. Click Project-> Add node Source/Application.

13. Locate where you saved the C file that you just created. Select your C file and click Open.

14. You are now ready to compile your project. Go to the Project menu and click Build All.

15. The compiler starts building your project. If you have successfully compiled the project, you should see something like this at the bottom of your IDE.

16. Go to your project directory and locate the hex file that you just created. This hex file is the file that you need to load to the program memory of your MCU.
Pages: 1 2

Comments