Micro-Controller Programming
Micro-Controller Programming
Fig (1) 2. The main window of the program will open as shown in fig (2)
Fig (2) 3. Click on Project, you shall see the figure shown in fig (3)
Fig (4) 4. Click on New, in the figure that appears write the Project name [for example: Project2] and determine a directory (Folder), in the desktop [for example: C:\Users\Salah\Desktop\June2011picprojects\2], then click OK.
Fig (5) 5. Project2 window with untitled workspace appears as shown in fig (6).
Fig (7)
7. Save the file in the folder [for example as lab2.c] as shown in fig (8)
Fig (10)
10. In the menu under View shown in figure (10) click on project, figure shown in Fig(11) will appear
Fig (11) 11. In the folder of Source Files do right click, and Press add Files, fig (12) below appears:
Fig (13)
13. Then click on the red bottom shown in fig (14) of rebuild with compiler:
Fig (14) 14. Connect the main controller board to the PICKIT2 programmer. 15. Connect the PICKIT2 programmer to the computer. 16. Click on Programmer and in the dropped menu click on Select Programmer as shown in fig (15)
Fig (15) 17. Choose PICkit 2 by clicking on it, the output file appears as in fig (16) which shows that PICkit2 is ready for programming:
Fig (16)
18. Click the red button of Rebuild with compiler shown in fig (17), fig (18) shows the message of successful build
Fig (17)
Fig (18) 19. Now you have your Microcontroller programmed, having your device (a LED for example) connected in the output pin [in this example the output pin is pin C7] you can examine it practically. By: Salah Eldeen Gasim, Sudan University of Science & Technology, [email protected]