Translate It!

    Translate to:

Print This Page Print This Page

Updating an 80’s Analog Synthesizer using PIC Microcontrollers

The reconstruction of the Digisound Synthesizer is a WORK IN PROGRESS. Please forgive any omissions, false assumptions and anything that is simply plain boring. Users of MIDI, Analogue Synthesizers and the PIC Microcontroller are free to copy etc. anything on this site. The source & firmware developed is available for FREE. I have freely perused the Internet for ideas and solutions these last few months. Where I use some others ideas or software, I have tried to give credit for this. Where others source-code has been used either partially or in its entirety, such software source is available freely under the original authors terms.

Joe Brown 12th December 2004

In the early ’80s, I bought and constructed a set of modules from Digisound as part of The ETI Project 80 Synthesizer. Programming the 6502 Controller card to support my own Chord Generator (Accordion) was my first introduction to programming a computer. This was to change my life, as in a very short time, I was programming as a career. The synth was stored, and moved with me from house to house, but was almost forgotten as my life was a very busy one. I am now semi-retired after a career in programming for the last 24 years, and I have seized the chance to once more look again at the almost-forgotten project. These pages are an attempt to document my recent activity in this direction, hoping that my experience can be of benefit to other synth users.

The reconstruction was split into sub-projects as follows. Just click on a link to access the relevant pages.

Below, part of the synthesizer during re-construction.

Synth during re-construction
Synth during re-construction

References and Resources

Back to TOP

The Digisound Project 80 Synth

The synthesizer was designed (mostly) by Charles Blakey of Digisound and is based on Moog principles. The voltage-controlled oscillator and filters modules etc., are designed around both the CEM (Curtis Electro Music Specialities) and SSM (Solid State Microtechnology) Integrated circuits. 1 Volt / Octave (0 – 10v) is used for control-voltages, whilst TTL levels are used for gating. My module inventory is given in the table below.

Module Inventory

My module inventory
My module inventory

The more observant of you will notice that there are several modules ‘missing’, from my list. I can’t remember the reason, but these ‘missing’ modules were substituted with modules from the Elektor ‘Formant’ Synthesizer and others designed by myself. The ‘missing’ modules are as follows:

Missing Modules
Missing Modules

In addition to the above I had a skeleton 61-note keyboard, with contacts. I also have some MIDI-based equipment, including an old Roland MT-32 unit, a Cheetah Master keyboard, BOSS Electronic Drum machine etc. My desire was to try and make some coherent MIDI-connected system including all of the units.

A New Controller Card

I examined the old Tangerine 6502 controller-card in the Alphadac and come to the decision that I wasn’t prepared to support the old code and hardware, despite the fact that I cut by back programmers teeth on 6502 Assembly Language. It was time to bring the ‘intelligent’ front-end of the Alphadac up-to-date, but with what? I was musing with buying a new controller card when I discovered the PIC!

I had heard of these, of course, over the years. But as almost my entire career has been programming Intel-based hardware (the PC), I had never used a PIC in anger. I bought a book (see resources) and a Velleman PIC Programmer and project board, and after downloading Microchips assembler (MPLAB) for free, programmed from the examples in the book. These early experiments covered polling pins, switching on LEDs, Timer and edge interrupts, debouncing switches etc., which gave me a good introduction into programming the PIC16F84. I thought I was ready to get stuck in to the first job of designing a PIC replacement for the old 6502 controller card. I made the (rash) assumption that I knew enough about MIDI to interface my existing MIDI keyboard to the DACs and Gates on the Alphadac motherboard. I decided on using a PIC16F876 as this had a serial port built-in, and enough free port pins to drive the address and data busses of the Alphadac, together with provision for a hexpad for executing command procedures.

Controller Requirements:

  • 8 Data lines D0-D7 For CV data, Gate and Portamento
  • 4 Address lines A0-A3, for DAC select (MAX 16 DACs)
  • A NOT WRITE Line to strobe data to DAC & Gate Latches
  • 4 Lines for a HEXPAD
  • MIDI IN Port
  • MIDI OUT Port
  • MIDI THRU Port
  • LED Indicator (for reassurance it is working)
  • RESET switch

I came up with the following:

A New Controller Card

Main Controller using PIC16F876A
Main Controller using PIC16F876A
This was built first of all on a breadboard, with an umbilical connecting the Address/Data lines etc to a Eurocard pin board plugged into the Alphadac controller position. When the hardware was working, and the software partially complete, components were transferred to the Eurocard. A 28pin ZIF socket was located on the Eurocard to facilitate quick and easy software updates. Most of the wiring on the new Eurocard is wire-wrap – I find that a lot easier than trying to solder fine wires to solder pads that are close together. (Galloping Myopia?) The photograph below shows the blue Eurocard with PIC installed, sitting in the controller position of the partially completed Alphadac. The old DIN cassette socket has been converted to MIDI THRU and two more DIN sockets join it for MIDI IN and MIDI OUT. On the front of the panel below the DIN sockets is the 18-position home-made HEXPAD. A Line-of-LEDs is mounted on the Eurocard connected to PORTB of the PIC and shows activity on the data lines D0-7. A ribbon-cable takes connections to the HEXPAD and MIDI sockets etc on the Alphadac front panel.
The updated controller
The updated controller
Pin assignments on the 64way Eurocard DIN Connector were dictated by the previous occupant – the old Tangerine controller card. These are as follows:
64way DIN connector (male)
Row Number                          a                      b
1                                              +5v                  +5v
2,3,4 No connections

5                                              A1                   A0
6                                              A3                   A2
7 – 16 No connections

17                                            NC                  NOT WRITE
18                                            NC                  NC
19                                            D0                   NC
20                                            D1                   NC
21                                            D2                   NC
22                                            D3                   NC
23                                            D4                   NC
24                                            D5                   NC
25                                            D6                   NC
26                                            D7                   NC
27-31 No connections
32                                            GND                GND

Change to Alphadac Interface Card.
Change to Alphadac Interface Card.
Interface Card Changes.
A small modification was made to the Alphadac ‘Interface’ card as follows:

  • Remove IC2 (the 8 input NAND gate)
  • Solder a wire between the existing READ/NOT WRITE input to the card (pin 19 on the cards DIN connector), to what was the output of IC2 (pin 7 on DIN connector). This is shown in RED on the following picture:
Hexpad Schematic
Hexpad Schematic
This home-made hexpad is based on a design note from Microchip entitled ‘A Keypad Controller for Bi-directional Key Matrix’. This design note is available on the Microchip site as DS40160A/4_12 (see resources) , but I don’t suppose they will mind me showing a small diagram from it here.
As the diagram shows, the basic idea is to scan the hexpad in 2 directions between any given 2 port lines. This allows for a lot more switches available on 4 port lines, than the standard simple matrix. My version used only 18 switches, simply by leaving some out. The firmware to drive the keypad was derived from the software given in the design sheet, together with a simple translation table and debounce software.

Software Specification.
The following are the requirements implemented in the software.

  • MIDI Keyboard input, handling Note On and Note Off MIDi events.
  • Ability to drive up to 16 DACs and Gates.
  • Ability to split Keyboard into MONO and POLY sections.
  • Ability to re-direct either MONO or POLY note events to the MIDI OUT socket.
  • Portamento available separately on MONO or POLY.
  • Transpose available separately on MONO or POLY.
  • Select MIDI channels for input and output.
  • Select number of active DACs. (My system currently has only 8 of a possible 16)
  • Selection of base note ie. The starting pitch for key 1.
  • Selection of Legato or staccato modes – ie. Re-gating.
  • Easy to expand.

Back to TOP

Implementation of firmware

As mentioned earlier, I had overestimated my knowledge of MIDI, and through this spent a while discovering just what was required. Up to this point, I had always just been a user of MIDI, and took it all for granted. Suffice it to say that in the course of development, I quickly realised that some form of monitoring was required, both to help in understanding what the MIDI devices I had were actually sending, and as a debug tool for the software development itself. A move sideways was made, as an ancilliary project, to build a MIDI Monitor. (see other projects) This tool has paid for itself many times over, and with hindsight should have been my first PIC/MIDI project. It now forms a permanent part of my MIDI hook-up, monitoring what is sent, and more importantly what has NOT been sent, AKA stuck notes.

The controller firmware is mostly complete, but will be updated as new requirements arise. Currently, the Digisound modules are being re-tested and re-calibrated. More of this later. The firmware for the latest version of the Alphadac Controller uses a PIC16F876 and is available here. MCV876.HEX. The MPLAB project source is available here: The Eagle schematic for the controller is available here. Alphadac.sch
Back to TOP

MIDI Keyboard Controller

The original Digisound hardware catered for a maximum of 64 key positions, requiring only data lines D0-5. A NOT ENDSCAN/STROBE interrupt is required and the controller has to assert an INHIBIT to the hardware oscillator for the key number to be read accurately. In addition I wanted to add scope for commands like keyboard split, start base note etc. so an old 4X4 Hexpad was pressed into service.

I put together the following using a PIC16F876A:

Keyboard Controller using PIC16F876A

Keyboard Controller using PIC16F876A

The software has to do several things as follows:

  • React to a KEYDOWN strobe, reading and storing the key value.
  • React to an ENDSCAN strobe (on the same line) when the counter reaches the end of the keyboard scan.
  • Convert any NEW key presses into MIDI NOTE ON events
  • Detect any KEYUPs and convert these into MIDI NOTE OFF events.

The above is achieved in the software with the creation and maintenance of 4 lists using both interrupt and foreground tasks, and is almost bullet-proof. I have not detected one lost/stuck note since completion of the unit.

The Digisound design for the keyboard maxtrix scanning is given below. This is taken from ‘80-15_ETI.pdf’ on Dave @ Homes site. The following table gives connections from my PIC controller to the Digisound Keyboard hardware:

10 pin Molex connector (on PIC Controller)     Connection on Keyboard Hardware

No.       Function                                                          Name

1          VDD 5V+                                                          +5V

2          RB6                                                                  D5

3          RB5                                                                  D4

4          RB4                                                                  D3

5          RB3                                                                  D2

6          RB2                                                                  D1

7          RB1                                                                  D0

8          RB0/INT                                                            NOT KEYDOWN/STROBE

9          RC5                                                                  INHIBIT

10         GND                                                                 0V

Original Controller Schematic

Original Controller SchematicPCB Layout of Original Controller

Below I’ve given Charles Blakeys amendments necessary to the the Digisound matrix-scanning hardware. The handwritten corrections are his. The document containing the full notes can be found in ‘Alphadac_E&MM.pdf’ on Dave @ Homes site.

Charles Blakeys Amendments

Charles Blakey's Amendments Below: Final test of the keyboard electronics before casing it up. The original Digisound key matrix scanning hardware can be seen middle of picture. Note also, the almost obligatory glass of Cabernet Syrah that accompanies such work. Final Keyboard Test Below: Another view during testing. The PIC Controller hardware was developed on the breadboard behind the controller panel. Another View of Keyboard

The firmware for the Keyboard Controller can be found here. KBDContr.HEX

The Software for the keyboard Controller can be found here:

The Eagle schematic is located here. KBDController.sch

Back to TOP

MIDI Chord Button Controller


The original Chord Button Controller was built around 1981 and had 72 keys and a shift mechanism so that a further 72 chords could be sounded. It was laid out as a matrix on a Digisound 9″X9″ steel panel. Each key was a small push-switch. The matrix was decoded using a 74154 and 74LS151, there was a hexpad, and the whole thing was driven off one of the 6522 VIAs onboard the Tangerine controller card. The software was developed by me on the Acorn Atom in 6502 machine-code and located in a 2716 Eprom on the controller card. A hook to the Chord Controller was made in the Digisound 1 software to link to the Chord software. There were plans to publish this, but pressure in other directions mitigated against this.

The layout of the keys is as follows. The rows are Chords, the columns the musical Key, and each x represents a push-switch connected between column and row.

          Keys (musical)                    
Normal   Dflat Aflat Eflat Bflat F C G D A E B F#   Shifted
Chords                             Chords
SIXTH   x x x x x x x x x x x x   AUG
NINTH   x x x x x x x x x x x x   SUS
MAJ   x x x x x x x x x x x x   MIN9th
MIN   x x x x x x x x x x x x   7Flat5th
7TH   x x x x x x x x x x x x   AUG7
MAJ7TH   x x x x x x x x x x x x   7SUS4
MIN6   x x x x x x x x x x x x   7Flat9th
MIN7   x x x x x x x x x x x x   DIM (O)
Below: the original chord-button hardware, built in 1981, now fitted with RV1, power socket, reset button and 2 LEDs.
Chord Controller Hardware

Chord Controller Hardware

Below bottom-view of top panel, the home-made shift-bar shows up clearly at the top of the picture. The new PIC Controller is mounted on the pinboard together with a 7805 TO220 regulator.

Inside View of Chord Controller

Inside View of Chord ControllerOriginal Matrix Decoder

I’ve re-used the matrix decoder I built in 1981, as I saw no reason not to. Both ICs are still available. The circuit for this hardware is below.

Chord Controller Schematic

Chord Controller Schematic

Original Matrix Decoder

Original Matrix Decoder

Back to TOP

The PIC Chord Controller.

The hardware replacing the 6502 and 6522 VIA is very simple, using a PIC16F876A and is shown below.

Chord Controller using PIC16F876A

Chord Controller using PIC16F876A

The firmware for the Chord Controller can be found here. ChordController.HEX

The software for the Chord Controller can be found here:

The Eagle schematic for the Chord Controller is here. ChordController.sch

MIDI Monitor

As mentioned on the Home Page, I had run in to difficulties through my lack of MIDI knowledge. To be blunt, I was unaware of what my commercially-built MIDI equipment was sending to the Alphadac Controller. I needed a MIDI Monitor as a debugging aid, and after searching the Web, found the code for a design by Bob Lang. Although only the code was available as I didn’t have access to the original Nuts and Volts articles, I reverse-engineered the hardware by studying the code. My final design looks like this:

MIDI Monitor using PIC16F876A

MIDI Monitor using PIC16F876A

The various switches functions are as follows:

Name Type Function Mode
S1 Push switch RESET  
S2 1 Pole Single-Throw Serial Mode Open: MIDI; Closed: Text
S3 1 Pole Single-Throw Display Mode Open: HEX; Closed: ASCII/Interpreted
S4 1 Pole Single-Throw Running Status Open: No Filter; Closed: Filtered
S5 1 Pole Single-Throw ASCII Baud Rate Open: 19,200; Closed: 9600
S6 Push Switch Display Stuck Notes  

The finished(?) MIDI Monitor with its initial labelling of the various switches etc. to remind me of what’s what.

The MIDI Monitor

The MIDI Monitor

A view of the inside of the MIDI Monitor. The rear of the Powertip 40×2 LCD can be seen at the bottom of the photograph.

Inside The Box

Inside The Box

View showing the PIC16F876A controller.

I amended the software to cater for my exact needs and the unit using a PIC16F876.

The modified source-code can be found here.midimon.asm

The modified firmware can be found here.midimon.HEX

The Eagle schematic shown above is available here.MIDIMON.sch

The original source and firmware can be found on Bob Langs site.

Back to TOP

MIDI Merger

As mentioned earlier, I have several MIDI-based units including an MT32. I wanted some method of connecting more than one unit to the MT32, for example a drum unit and my MIDI keyboard, together with output from a PC. I searched around on the Web, and the only design I found was one by Thorsten Klose, who seems to be a bit of a MIDI GURU, with a huge website dedicated to all things MIDI. Thorstens design is based around a PIC16F877 40pin unit and utilises both the standard UART for 1 MIDI input, and a bit-banging software UART on the T0CK1/RA4 pin, thus supporting the merging of 2 MIDI streams into 1.

This was not enough for my requirements and so I re-vamped the hardware design to use 3 PIC16F628A units. These are 18pin and cheaper than the PIC16F877. (and obviously less pins) I have also re-used Thorstens excellent software and the final design supports 4 inputs. Only one of the PIC units has an oscillator, and this is shared after buffering, with the other 2 PIC units. I have added a reassurance LED to each PIC unit, and these flash briefly after power-up or reset to let you know all is well. The final hardware design looks like this:

MIDI Merger Schematic using PIC16F628

MIDI Merger Schematic using PIC16F628ABelow: the completed MIDI Merger in use.The MIDI Merger In Use

Below: The (too) compact internal construction of the MIDI Merger. The 3 16F628A PICs can be seen on the right, with the 74LS04 and 6N135s on the left.

Internal Construction of MIDI Merger

Internal Construction of MIDI Merger

Thorstens original software is supplied on his site, (References and Resources) should you prefer to use this. I have combined the several original source files into 1 only. Note that only the CONFIG line is different for the external-oscillator versions as follows:

 First the oscillator version:

              __CONFIG _HS_OSC & _WDT_ON & _PWRTE_OFF & _CP_OFF & _BODEN_OFF & _LVP_OFF

 And this is the External oscillator version:


 The single-source file can be found here. Don’t forget, you must comment out the unwanted CONFIG line before invoking the assembly. MIDIMerge628.asm

The firmware for the external oscillator version can be found here. MIDIMerge628_EXT.HEX

The firmware for the oscillator version can be found here. MIDIMerge628_OSC.HEX

The Eagle schematic for the design can be found here. MIDIMerge.sch
Back to TOP

 MIDI Channel Indicator

 I wanted a visual indication of what MIDI channels were in use on my MIDI setup. If I’d thought ahead, I would have built this facility into my MIDI Merger. As it was, I looked on it as an opportunity to try out the C18 ANSI C Compiler I’d downloaded from the Microchip site. Using C cuts down your options as to what PIC you can use. In this case I chose the PIC18F452. The program is relatively trivial. It monitors the MIDI input port for NOTE ON and NOTE OFF events. When one is detected, an LED corresponding to the transmitted channel is lit. After a fixed delay the LED is then extinguished. In my design, I also included a MIDI OUT port which simply passes through all MIDI data without change. The hardware is equally simple and looks like the following:

MIDI Channel Indicator

MIDI Channel Indicator

The MIDI Channel Indicator In Use

The MIDI Channel Indicator In Use

The Pinboard With PIC & LEDs Mounted

The Pinboard With PIC & LEDs Mounted

The software source can be found here. MIDIInd.c

The compiled firmware is located here. MIDI Indicator.hex

The Eagle schematic can be found here. MIDIndicator.sch

Back to TOP

References & Resources

Dave @ Home has an excellent website for Digisound Synth Users. All of the modules used in the synthesizer are documented here.

Thorsten Klose has a huge website dedicated to music production and MIDI, using PIC Controllers. It can be found here.

Copy the code below to your web site.
  • Share/Bookmark

You must be logged in to post a comment.