Running the App I/O Code

To run the App I/O examples fromUsing App I/O with 8- and 16-Bit MCUs orUsing App I/O with 32-Bit MCUs:

  1. Create a project using the Project wizard:
    1. Select a supported device.
    2. SelectREAL ICE™ orICD 3 as the hardware tool.
    3. Use an MPLAB® XC C Compiler as the language toolsuite.
  2. SelectFile > New File to create and name a new C Source File. In theEditor window that opens, add the previous code and save.
  3. Right-click on the project name in theProjects window and selectProperties. In theProject Properties window, click on “xcnn-gcc” underCategories, wherenn is either 16 or 32. Under “Option Categories”, select “General” and check the “Enable App IO” checkbox.
  4. Some examples may require a heap. In theProject Properties window, click on “xcnn-ld” underCategories, wherenn is either 16 or 32. Under “Option Categories”, select “General” and enter a heap size (e.g., 512) in the text box "Heap size (bytes)".
  5. Build the project (Right-click on the project name and select “Build”).
  6. SelectWindow > Debugging > PIC App IO to open theApplication In/Out window.
  7. Click on theProperties button (on the left of the window in Figure 1) to launch theSet App IO Properties dialog. UnderCapture clickOn.
  8. Debug Run or Run the project.
  9. Enter a text value in the Input text box. Hit <Enter>.
  10. View the output in theOutput text box (Figure 2).

Figure 1: Set App I/O Properties

AppIO_Setup_X.gif

Figure 2: App In/Out Window

AppIO_Window_X.gif

Change Input and Output Formats by opening the Set App IO Properties dialog and running the program again to see what outputs result for different inputs.