PICsynth V2 Technical Information - 23 Nov 2008. [Technical information for PICSYNTH V2 chip : Only difference from V1 is PIN 2 is pitch adjust pin and takes analog voltage from 0-5V] The PICsynth V2 chip is programmed in assembler. It needs to be connected to a 20 Mhz ceramic resonator or crystal. It produces notes in range C6 (1046 Hz) - B6 (1975 Hz) by default. The actual chip supplied will be a pic18F1220 (V1 was pic16F628a). The chip is supplied with code protect on. PIN 1 is oscillator 2 output PIN 2 is pitch adjust pin. PIN 2 should be connected to analog voltage from 0-5v to adjust pitch of oscillator 1. 2.5V is the center position. For example connect to slider of a 100K linear pot connected between 0 and 5V. PIN 3 is detune1 option. NOrmally this is made high. A low on this PIN will provide a nice close detune option across all octaves. The pitch adjust (PIN2) is disabled when PIN 3 is made low. PIN 4 is PIC reset and should be made high. PIN 5 is ground. PIN 6-9 are "octave sense" lines. Pin 6 is referred to as octave 1. Pin 9 is referred to as octave 4. PIN 10-13 is the "note bus". Pin 10 is least significant bit. PIN 14 should be connected to regulated +5v PIN 15 and PIN 16 should be connected to the outer pins of a ceramic oscillator. The center pin of the ceramic oscillator is grounded. PIN 17 is oscillator 1 output. PIN 18 is trigger output. The PIC outputs continuous square waves on both oscillator pins. The PIC chip note bus cycles from 11 to 0 using postive logic. This corresponds to notes B through C. In my circuit this note bus is decoded by 74HC154 decoder to 1 of 16 lines (74HC154 has negative logic output ie lines go low). The PIC chip checks for Octave sense lines 1 thru 4 going low. The octave lines should be tied to +5V via a resistor. When a key is pressed and PIC is outputting that note on note bus, the octave line that the key is connected to will go low. The PIC checks for a low on octave sense line after every change of note on note bus. When a low octave line is found the pitch will change to the correct note in the correct octave. The PIC chip then makes trigger line high for 12 ms. This trigger pulse normally triggers an envelope generator. The PIC chip then cycles back to the start and rescans from highest note again. Some things to note : If the key is held down then the PIC will continue to issue trigger pulses. If two keys are held down then the top key will be the note output. If you hold down a low key to make a low note then press a high key the higher key will take over - the pitch changes. If you hold down a high key and press a lower key then nothing will change ie the lower key wont be scanned until you release the higher key. In my circuit each oscillator output is connected to a 4520 divider and range is selected via a H/M/L switch. So If a key is pressed in octave 4... The divide by 2 output produces C5 (523 Hz) to B5 (987 Hz) - H position. The divide by 4 output produces C4 (261 Hz) to B4 (493 Hz) - M position. The divide by 8 output produces C3 (130 Hz) to B3 (246 Hz) - L position. If the key is pressed in octave 3 everything gets divided by 2 etc So with a 4 octave keyboard I get H = C2,C3,C4,C5 M = C1,C2,C3,C4 L = sub octave, C1,C2,C3 The reason PIC only produces C6-B6 in highest range is to do with speed of PIC chip. Higher notes are more difficult to get at right pitch. Above discussion relates to perfect pitch ie PIN2 at 2.5V and PIN 3 high. The pitch of oscillator 1 can be varied by altering voltage on PIN2 or by making PIN 3 low for a fixed detune. When combined with fixed pitch oscillator 2 you get rich beating interactions.