Powered by Blogger.


Tagged under:

Step by Step Guide to Set Up Your MPLAB Project

In this tutorial, we shall show how to set up your MPLAB project. In order to program the microcontroller, the MPLAB and Microchip C Compiler for PIC18F are needed. Download and install both of them.
Link to MPLAB IDE V8.80(Not MPLAB X) and Link to Microchip C Compiler for PIC18(LITE mode or standard evaluation)
MPLAB IDE and Microchip C Compiler are software by Microchip Technology

After installing, we are ready.
1) First of all, we need a project. Each microcontroller program needs a project to generate a hex file. Go to Project > Project Wizard

2) You will be brought to the Project Wizard window. Click on Next

3) Choose your PIC Device. In the autocar case, use the PIC18F4520. Note that the picture shows PIC18F452.

4) There after, hit Next

5) You will be brought to the Language Toolsuite selection. This part is to make your C programming file compiled into Hex file. Hex file is the program to be loaded into the microcontroller

6) If everything goes well, the assembler, compiler, linker and librarian will be found by the MPLAB. Make sure to install the Microchip C18 C compiler first. If somehow the content cannot be found, you will have to browse to the installation file for the C18 C compiler. Hit Next

7) Click Browse

8) Browse to a desired folder and enter a project name. Hit Save

9) Then Hit Next

10) We can skip this step. This is actually the part to select you desired H file and C file. Since we have not yet created the C file or H file, we can skip this step. We will show you next on C file creation.

11) After that, we will be brought to the workspace. For ease, bring out the project window and output window. Go to View > Project

12) Click on Output too.

13) We shall proceed to the C file creation. Go to File > New

14) Enter the include and main function in the MPLAB IDE Editor to include the p18f4520.h header file. Note that this file is an extension-less file. Which means it don't have .txt or .c or .h or anything.

15) Next, we shall save the file. Click File > Save As...

16) For ease, save the file in the folder where you have created the project. REMEMBER to save with .c extension

17) Note that the text in the editor will change to C file compatible colours.

18) Although the file was created, it have not yet been added into the project. Right click on the source file in the project panel and click add file.

19) Choose your C file.

20) Then we are ready. Hit on Build All...

21) If everything goes well, we will see Build Succeeded. If anything goes wrong, try to see what is the error from the Output panel. Try to solve it yourself first, only seeking help from the members.

You can also download the step by step guide here at this link.

Creative Commons License
This text and figures are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.


Tagged under:

Robocon Workshop 2012.

Team Robocon 2012 organized a 2-day workshop for students from Universiti Teknologi Malaysia to teach about robotics.

We are pleased to inform that our Robocon workshop ended with great success. It was a fantastic experience and above all, there were more participants than we expected. There were around 150 students from different faculties participated in this workshop.

After this workshop students will be working on Robocon Autocar challenge . Thanks for those who participated in this workshop.


Tagged under:

Microchip IDE and Datasheet

The following links provide direct download of datasheets for ICs related to Robocon Autocar Challenge 2011 :


IDE to program PIC microcontroller :

MPLAB 8.76 (download MPLAB 8.76 or latest version at the bottom of page)
C18 c compiler for PIC18 (download MPLAB C for PIC18 v3.40 in LITE mode)
USB to Serial Adapter (RS232) Driver (download according to your Operating System - Windows/MAC)(Latest Driver)

Check out this webpage for more details...
Tagged under:


MAX232 Sample of Connection
This is an example of how to connect a MAX232 IC. Always bear in mind that you can always find another type of connection of this chip in any related website other than this. It's encourage that to discover yourself of how to built your circuit especially for those who already have experience in building a circuit.



Tagged under:

Notice for Mechanical and Autocar Assignment Participants

How to get to E05 ?
The meeting is on 12/10/2011 (Wednesday) at 8.30 pm, E05 FKM (red cirlce in the map).  Please wear a long pants and be punctual. All the information and game rules regarding the mechanical and autocar assignment will be further discussed in the meeting.

For those who haven't pay for the fees of autocar assignment are required to pay in the meeting. Any payment made after the meeting will not be accepted.

How to get to E05 FKM ? The E05 lab is circled in the map above. There is a bus station in front of the block D06 and E05 is at right behind it. You may follow the red line in the map to get to E05.

Here is the list of components for autocar. This is an standard list of components for an autocar. You can buy extra components other than the listed.

Facebook Page: UTM Robocon Team


Tagged under:

Robocon Workshop Update !

 To all students who registered for UTM Robocon Workshop .

The venue for the workshop will be at P19, DK4 (next to cafeteria Noor) on 8(Sat) & 9(Sun) October 2011. For your information, the workshop registration will starts at 8.00 am and the workshop will begins at 8.30 am SHARP. The participants are required to be on time to ensure the flow of the workshop will be running smoothly. We are pleased to tell that breakfast and lunch will be provided for the registered participants. For those who have transportation problems may refer to the previous post regarding the bus' route. The bus will depart at 8.00 am SHARP.

Any updates from UTM Robocon will be posted here www.utmrobocon.com.

For any further enquirers, kindly contact:

Yuvarajoo      - 016 - 698 9044
Liang Xuan    - 016 - 787 3287
Thol Yong      - 017 - 676 5384
Shin Yee        - 013 - 781 0401


Tagged under:


Good news ! Transport is now confirmed only for those who have transportation problem to attend the workshop at the weekends. Due to the limited places in the bus, those who are staying nearer to P19 (mainly KTC S37-S40 / S19)  have to walk there.

There are three assembly points which are located at:

FAB Bus and Taxi Station  (Point A in the map)
KTC - S43 Bus Station
Arked K9 (Point B in the map)

Workshop participants are strongly encouraged to gather at the assembly points before 8.00 am because the bus will depart from Arked K9 (Point B) on both 8th an 9th of October.

Best regards.