LED Flashing
by : Torongo | December 15, 2012 | 1 comments Skill Level: Beginner

First Project by XMC4500 Relax Kit, LED Flashing

Now you are ready to do a simple project like Led flashing or blinking by XMC45000 Relax kit. I am trying  to give here primary tutorial so that you can do it by yourself.

First of all we need to know what is the pin no of led and switch which is placed on the board. For this we need to see below circuit diagram:



Now we can notice that two of the LED is connected to P1.0 and P1.1.

Now we will go step by step to complete our first project:

1.You need to start your DAVE3 from your desktop or Start> All programs> Dave3
2.Now we need to start a new project from File> New> Dave project



3. Now we need to give the name of the project.


4. Then we need to select the Processor.



 5. Now our project is ready to do main things. Now we select our IO ports.

     For this project we choose Software controlled IO Apps. Then double click

     to IO004.



6. Then we click the right button of the mouse on  IO004/0 and then

choose UIEditor.




7. Now we need to enable the pin as output.

8. Now we need to take another pin as output. So we put double

click again on IO004 for take another pin as output and follow

previous instruction.






9. Now we need to assign the pin no according to the picture below.







10. Now we come to write to code. but before that we need to click

generate code.

11. Now we write code and and click build active project.


12. After that we debug our code and run it. For this we need

to maintain the  procedure shown below:


13. And Finally we click play button and see what happenes in board:


* Main.c
*  Created on: Dec 12, 2012
*      Author: Torongo

#include <DAVE3.h>            //Declarations from DAVE3 Code Generation (includes SFR declaration) void delay(unsigned long int i) { while(i--) { __NOP(); } } int main(void) { //status_t status; // Declaration of return variable for DAVE3 APIs (toggle comment if required) DAVE_Init();            // Initialization of DAVE Apps while(1) { IO004_TogglePin(IO004_Handle0); IO004_TogglePin(IO004_Handle1); delay(1000000); } return 0; }


Login to post comments.
Dukeleon | Mar 27,2015 at 09:23 PM
good one.go ahead bro...

Copyright © 2012-13 Techshop Bangladesh. All rights reserved.