
Micro Chiptune is a monophonic square-wave synthesizer. A programmable divider toggles the audio pin once per half-period. The tuning assumes a 64 kHz input clock. A second counter advances the selected effect and changes the period for the next half-wave.
| Effect select (bits 4–3) | Sound while the gate is high |
|---|---|
| 00 | Steady note |
| 01 | Eight-step vibrato. The half-period varies by up to two clocks either side of nominal. |
| 10 | Root, fifth, octave, fifth. Each pitch lasts four effect ticks. |
| 11 | One descending laser sweep. It starts near an octave above the selected note, lengthens the half-period by four clocks per step, then holds the last pitch. |
The note selector (bits 2–0) chooses C4, D4, E4, F4, G4, A4, B4 or C5, in that order. Rate settings 00, 01, 10 and 11 (bits 6–5) advance the effect every 64, 32, 16 and 8 ms, respectively. Changing mode while playing restarts the effect sequence. Changes to note or speed take effect live. The gate (bit 7) is active high. Release it to mute, then raise it to retrigger. All eight inputs pass through two sampling stages. Switch contacts can bounce, so use a clean gate signal when precise triggering matters.
0x85. Observe a square wave near 438.36 Hz on output 1. Output 0 carries the same waveform for audio. Set the input byte to 0x05 to mute.0xCD for A4 vibrato or 0xB0 for a C-major-scale root/fifth/octave arpeggio starting at C4.0x18, then 0x98 to trigger a slow laser. Its half-period starts at 61 clocks and settles at 121 clocks after approximately 0.96 s. Repeat the low/high gate transition to hear the sweep again.Use a digital oscilloscope with a high-impedance input on output 1 and a common ground. For sound, feed output 0 into a high-impedance audio buffer or a piezo driver compatible with the board's logic levels and connect a passive piezo to the driver. The audio pin carries a digital square wave. An external DAC is optional. Outputs 2 through 7 are held low.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Note bit 0 | 1-bit audio | |
| 1 | Note bit 1 | Oscilloscope copy of audio | |
| 2 | Note bit 2 | ||
| 3 | Effect bit 0 | ||
| 4 | Effect bit 1 | ||
| 5 | Rate bit 0 | ||
| 6 | Rate bit 1 | ||
| 7 | Gate, active high |