My first experience with DAVE - Ping Pong Game for XMC4500 Microcontroller

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Pranava_Tripath
Employee
Employee
Recently I downloaded DAVE. What I really like the most about DAVE is that it abstracts detail of the controller hardware (which as a software developer I always find cumbersome), and that it avoids complexity of writing time consuming low level drivers and libraries.

In approximately 20 min I could compile, build, and debug a simple display example project. Later I extended the example project to make a Ping Pong game (source code attached below) that uses XMC4500 in-built ADC to move the paddle or bat to avoid the ball from falling. See the attached image below.

932.attach

Detail of my experiment:

(1) Boards used: CPU Board XMC4500 General Purpose and Standard Human Machine Interface

(2) Install DAVE and then install Apps from http://www.infineon.com/DAVE. (In case you need any help refer https://www.infineon.com/dgdl/DAVE+Quick+Start+PresentationTutorial+v2-1.pdf?folderId=5546d4694909da.... This document provides detail steps to install apps and run the example project.)

(3) Download OLED Display GUISL-Example1.

a. In DAVE IDE, Help -> Install DAVE Apps/Example Libraries (this opens Library Manager Wizard)
b. Under ‘Work with:’, select ‘DAVE Project Library Manager’ option (combo box)
c. Under ‘Libraries’, select XMC4000 -> XMC4500 Series -> DAVE3 Example Projects with DAVE Apps -> Human Machine Interface -> Graphical User Interface -> OLED Display GUISL-Example1, and press Next
d. Accept the term and press Finish. Now the selected example project will be downloaded.
e. Press ‘Yes’ to import example project in workspace.

(4) Expand GUISL001_Example1 from project window and double click main.c. The file will be opened in editor. Replace the default content by content of the attached main.txt file.



(5) Build the project and load the image using debugger and run it.

That’s all. The Ping Pong game is ready. Move the paddle/bat by rotating knob of the potentiometer available in the CPU board.

Summary of my first experience:

In less than a day I could make a graphic application without being bothered about IDE, debugger, low level drivers and graphics library, or any detail of the XMC4500 microcontroller such as datasheet or register details. Thanks to DAVE IDE, and comprehensive set of example reference projects, libraries and apps, all of which are provided as part of the DAVE package.

Have fun working with DAVE 🙂
0 Likes
10 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Good Job...
0 Likes
Not applicable
Hello!
It's my first time when I use DAVE and I have a problem running the project.
I have all the boards we need.
I'm stuck at step 5...can please anyone help me?
0 Likes
Pranava_Tripath
Employee
Employee
Can you pls elaborate problem you are facing in Step 5? Share screenshot/message etc. I shall get help for you
0 Likes
Not applicable
I followed steps 1->5 until built and it's all ok
1073.attach
1074.attach
I hit debug and get this error
1075.attach
This is a picture with my boards
1076.attach
If you dont have an idea i can let you look at it throw teamwiewer.
Thank you!
0 Likes
Pranava_Tripath
Employee
Employee
Can you start J-Link (commander) explicitly (you may have icon on desktop or get it through windows program i.e. start-> all programs -> segger -> j-link). this will open a console. If connection is all well then (and you don't get any error message), let it be open. Then go to DAVE and start debug. Let me know if it helps
0 Likes
Not applicable
You will not belive this,it was because of USB port.i changeed it now,works
It builds properly and it stops.
I think i have to press another button,i'm don't know wich one, to make something move on the screen....
Can you tell me what to do next?
0 Likes
Not applicable
printscreen
1077.attach
0 Likes
Pranava_Tripath
Employee
Employee
themyrel, you have successfully built and loaded image in controller. Congrats!
Your screenshot suggests that the debugger stops at default break point which is start of 'main'. Press resume button (yellow tall rectangle+green triangle icon in Debug tag of right bottom window frame) to continue. Do let me know if it works and you are able to run ping pong game on controller. Please note that to move paddle or bat on screen (on HMI board) you should rotate potentio meter knob available on controller board.
0 Likes
Not applicable
It works!
The problem was the bad conection between hexagon and HMI(wrong port)
I had to do a homework at school using this boards and the teacher let us use examples from Infineon homepage.
I found yours.....
Picture with working game
1078.attach
Really great job!
0 Likes
Not applicable
Hi Pranava Tripathi,

Can you please help to achieve this using DAVE4.


Thanks,

M.Ramarao.
0 Likes