3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

NES Controller iPod Remote

Step 6PIC

PIC
I used a dsPIC30F2011. These and many other PICs can be sampled from Microchip's site at http://sample.microchip.com/
I used a dsPIC instead of a normal PIC because
1. It can run on 3.3V that is provided by the iPod
2. It has 8 I/O ports for all of the buttons
3. It has an easy to program UART module, which can send data to the iPod with no conversion needed.
4. I already had one and a programmer.

Any other microcontroller that you know how to use and meets these requirements can be substituted, but the wiring will be different.
The downside of using a dsPIC is that the programmer is quite expensive (The ICD2 is now $160). There are free tools at http://homerreid.ath.cx/misc/dspicprg/ that can be used with a homemade JDM programmer, but I have never attempted this.

The zipped files are the code for the PIC. It is a project in Microchip's freely available MPLAB IDE . If you want to modify it or recompile it, you will also need Microchip's C Compiler , which has a free student edition. These can be used to generate the neccesary hex file (also in the zip) for programming with MPLAB or the aforementioned JDM programmer.

The code samples the I/O ports 64 times per second, and if there is any change, sends various commands over serial to the iPod.
I used publicly available documentation on the Apple Accessory Protocol (AAP, or iAP) to write the code, and it is talked about at http://www.adriangame.co.uk/ipod-acc-pro.html and http://nuxx.net/wiki/Apple_Accessory_Protocol

Up, down, left, and right are volume up, volume down, previous song, and next song, respectively. A plays/pauses the music, while B stops it. The select button mutes, and the Start button, when held, enables you to control the iPod's interface directly. With start held, up and down scroll the wheel, and A and B operate the iPod's select and menu buttons.
« Previous StepDownload PDFView All StepsNext Step »
2 comments
Mar 8, 2008. 9:24 PMspikerbond says:
what microcontroller? there are four different ones with 18 leads

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
21
Followers
3
Author:Senator Penguin(tchips.com)