Datasheet
6.2 Basic Accessory Demo
This is the basic accessory demo that shows simple bi-directional communication from the Android device to the attached
accessory.
6.2.1 Getting the Android Application
There are several methods for getting the example Android application running on the target Android device. Before
attempting any of these methods, please insure that the Android device is running the appropriate version of the Android OS
(Updating the Android OS ( see page 37)).
Once the proper OS version is installed, please use one of the following methods to get the application into the Android
device.
6.2.1.1 From source
The source code for the example Android application is included in this installation. You should be able to compile and use
the IDE of your choice to directly load the example application as you would any other Android example program. Once the
application is loaded on the Android device you can remove the USB connection to the IDE and connect it to target
accessory to run the demo.
6.2.1.2 From Android Marketplace
The example application can be downloaded from the Android Marketplace. You should be able to find the demo application
by searching for "Microchip" and looking for the "Basic Accessory Demo" application.
You can also download the file by:
1) Go the the following link in the browser:
https://market.android.com/details?id=com.microchip.android.BasicAccessoryDemo&feature=search_result
2) Click on the below link from an Android device capable of running the demo:
market://details?id=com.microchip.android.BasicAccessoryDemo
3) Use a bar code scanner to scan the following QR code:
6.2.2 Preparing the Hardware
Before attempting to run the demo application, insure that the correct firmware for the demo application has been loaded into
the target firmware.
The firmware for this example can be found in the "Basic Accessory Demo/Firmware" folder of this distribution. Open the
correct project file for your hardware platform for MPLAB 8. If you are using MPLAB X, open the MPLAB.X project folder and
change the configuration in the configuration drop down box. Compile and program the firmware into the device.
Microchip's Accessory Framework for Android(tm) 40
40
6