Project 2: MinIMU-9 v2 with EagleSoC Dev. Board (continuation)
Now double-click on the timer itself. Select 32-bit resolution, UDB Implementation, and Maximum Period as shown in Figure 23. Click "OK".
Figure 22: Timer Clock Configuration
In your catalog search for the I2C Master component.
Figure 23: Timer Configuration
Drag and drop I2C Master to any free space within Top Design area.
Figure 24: Component Catalog - I2C Master
Search again for UART component within the catalogue.
Figure 25: Drag and Drop I2C Master
Drag and drop the UART to Top Design.
Figure 26: Component Catalog - UART
Search for the LCD Character Display component.
Figure 27: Drag and Drop UART
Also drag and drop LCD Display to the Top Design.
Figure 28: Component Catalog - LCD
We are finished with adding required components. Let's proceed with their configuration. Double-click on UART and uncheck RX on byte received Interrupt. This will prevent an interrupt from execution on every RX.
Figure 29: Drag and Drop LCD
Scroll down towards UART's advanced features. Deselect the voting checkbox as shown in Figure 31. Also, increase the TX buffer size from 4 to 128. This will enable TX internal interrupt. Click "OK" to finish UART configuration.
Figure 30: UART Configuration - Interrupts
In your project directory (left-hand side), double-click on .cydwr file. This will open your Pin Configuration as shown on Figure 32.
Figure 31: UART Configuration - Advanced Features
Select the appropriate pins that will physically match wiring connections on your EagleSoC board. You can use Figure 33 as an example.
Figure 32: Pin Configuration
Add the C files to your project: device.h and main.c. These files will be soon available on this web-site for your download.
Figure 33: Configure Pins
Now you are ready to compile and build your project. Select Build from the menu and choose "Build 'project name' ".
Figure 34: Add Project Files
Verify that your project has no errors as shown in Figure 36. Otherwise, re-check previous steps to make sure you did not skip any important information. If you have errors verify that the PSoC Creator version is 3.0, all required libraries are properly added, and that all configurations were in accordance to this tutorial.
Figure 35: Build Project
Upon successful build message, find your Serial Wire Debug (SWD) cable as shown in Figure 37 and properly connect it from your PC (USB) to your EagleSoC board (SWD). Plug the power adapter to the EagleSoC and connect it to the outlet.
Figure 36: Build Success Message
Click on Debug and then click on "Select Debug Target".
Figure 37: Serial Wire Debug (SWD) Programming Cable
Make sure your chip is appropriately identified. If you see warnings or your chip is not detected, try to reconnect the power and the SWD cable several times. You will see Figure 39 on successful EagleSoC recognition.
Figure 38: Select Debug Target
Set your active protocol as SWD with clock speed of 3.2 MHz.
Figure 39: Chip identification
On your PSoC Creator 3.0, press the "Program" button as shown on Figure 41.
Figure 40: Protocol Settings
You should see successful display message as shown on Figure 42.
Figure 41: Programming EagleSoC Board
In order to see IMU information via UART, connect your computer to EagleSoC via USB cable. This is done through USB-to-Serial port shown on Figure 43.
Figure 42: Programming Success Message
If you don't have PuTTY, then download this console from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html or other web-server.
Figure 43: USB to Serial Cable
Open PuTTY and configure your port based on the COM for your EagleSoC USB device. You can find the COM number in your Control Panel, Device Manager. Choose Serial connection type and set the speed to 57600 as shown on Figure 45.
Figure 44: Download Putty
Run Putty and your program's output should appear in window, similar to Figure 46.
Figure 45: Putty Port Configuration
For LCD information display, plug-in LCD screen to the appropriate EagleSoC port. You should see partial IMU information displayed in alternating pattern due to its limited screen size (Figure 47).
Figure 46: Euler Angles Output via UART
The complete physical project wiring is shown on Figure 48. You have now completed 2nd EagleSoC Tutorial.
Figure 47: Euler Angles Output via LCD
Figure 48: Complete Physical Setup and Wiring
Project 2 - First Page
The code samples will be provided at a later time.