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
6. Then we click the right button of the mouse on IO004/0 and then
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
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
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:
* Created on: Dec 12, 2012
* Author: Torongo
#include <DAVE3.h> //Declarations from DAVE3 Code Generation (includes SFR declaration)
void delay(unsigned long int i)
//status_t status; // Declaration of return variable for DAVE3 APIs (toggle comment if required)
DAVE_Init(); // Initialization of DAVE Apps