Microdrummer is a complete drum machine, built around a single 8-bit PIC18F2620.
The project started when I decided to play back some WAV samples on a PIC doing D/A-conversion with the built in PWM-module.


  • Simultaneous playback of up to six 22.05 KHz 8 bit samples stored in the flash program space
  • 16 x 2 character LCD and five buttons for controlling
  • Sequencer with an extensive set of settings
  • MIDI-input for tempo synchronization with an external device
  • Two effects can be added to each bar; pitch variation and bit-reduction


I've decided not to release the source code or hex code for this project, but I'll write up the main concept: One of the CCP-modules are used as a PWM-generator, and is running completely standalone (not generating any interrupts). The second CCP-module is used to generate an interrupt on compare-match 22050 times each second. This interrupt routine will load the next sample for each of the sounds that are set to be played back, and all these samples are easily summed (signed 8-bit variables) and loaded into the PWM-module after adding DC-bias to get the samples to swing around 2.5 volts. Another timer generates the time base for the tempo.


The main idea was to keep the hardware as simple as possible, and do as much as possible inside the PIC. As of now I haven't even added the OP-amp in the schematic below. Most of the software was developed on a prototype on a breadboard:

img img

Later the first hardware revision was made. Unfortionately, I never took the time to make a PCB in Eagle:

img img img img img img img img img img



You need to be logged into Facebook in the browser for comments to appear

Design: Jon Petter Skagmo