Hi, I have just built a prototype of the simple USB MIDI expression pedal, which uses very simple self-made capacitance sensor to measure the position of the pedal. The device is based on the AVR (ATmega8) microcontroller, but can be easily ported to PIC. The capacitance between two copper plates creates the low-pass RC circuit. This circuit is connected to the PWM output, and its output is connected to the ICP (Input capture) system working with the same timer as PWM. It allows to measure the delay between slopes of signal on the input and on the output of the RC circuit. More details of the design may be found at my website: http://www.ise.pw.edu.pl/~wzab/MIDI/pedal/index.html Firmware is significantly based on the V-USB MIDI design, available at http://cryptomys.de/horo/V-USB-MIDI/ I hope that the above may be useful for someone. -- Regards, Wojtek -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist