Silicon ChipDigital FX (Effects) Pedal – Part 2 - May 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Farewell to Gary Johnston A Remarkable Australian
  4. Feature: Digital Radio Modes – Part 2 by Dr David Maddison
  5. Project: Programmable Hybrid Lab Supply with WiFi – Part 1 by Richard Palmer
  6. PartShop
  7. Project: Digital FX (Effects) Pedal – Part 2 by John Clarke
  8. Project: Arduino-based MIDI Soundboard – Part 2 by Tim Blythman
  9. Review: EVOR04 Audio Analyser by Allan Linton-Smith
  10. Project: Variac-based Mains Voltage Regulation by Dr Hugo Holden
  11. Feature: The History of Videotape – Cassette Systems by Ian Batty, Andre Switzer & Rod Humphris
  12. Serviceman's Log: Some jobs are much harder than they should be by Dave Thompson
  13. Product Showcase
  14. Vintage Radio: 1972 BWD 141 Audio Generator by Ian Batty
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: ESR Meter with LCD readout, Circuit Notebook, May 2016; Barking Dog Blaster, September 2012
  18. Outer Back Cover

This is only a preview of the May 2021 issue of Silicon Chip.

You can view 41 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Digital Radio Modes - Part 1 (April 2021)
  • Digital Radio Modes - Part 1 (April 2021)
  • Digital Radio Modes – Part 2 (May 2021)
  • Digital Radio Modes – Part 2 (May 2021)
Items relevant to "Programmable Hybrid Lab Supply with WiFi – Part 1":
  • WiFi-Controlled DC Electronic Load control PCB [18104212] (AUD $10.00)
  • Programmable Hybrid Lab Supply Control Panel PCB [18104211] (AUD $10.00)
  • Programmable Hybrid Lab Supply Regulator Module PCB [18104212] (AUD $7.50)
  • 2.8-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $25.00)
  • ESP32 DevKitC microcontroller module with WiFi and Bluetooth (Component, AUD $25.00)
  • Software, manuals and laser templates for the Programmable Hybrid Lab Supply (Free)
  • Programmable Hybrid Lab Supply Control Panel PCB pattern (PDF download) [18104211] (Free)
  • Programmable Hybrid Lab Supply Regulator PCB pattern (PDF download) [18104212] (Free)
  • Drilling/cutting diagrams and front panel artwork for the Programmable Hybrid Lab Supply (Free)
Articles in this series:
  • Programmable Hybrid Lab Supply with WiFi – Part 1 (May 2021)
  • Programmable Hybrid Lab Supply with WiFi – Part 1 (May 2021)
  • Programmable Hybrid Lab Supply with WiFi – Part 2 (June 2021)
  • Programmable Hybrid Lab Supply with WiFi – Part 2 (June 2021)
Items relevant to "Digital FX (Effects) Pedal – Part 2":
  • Digital FX Unit PCB (potentiometer-based version) [01102211] (AUD $7.50)
  • Digital FX Unit PCB (switch-based version) [01102212] (AUD $7.50)
  • 24LC32A-I/SN EEPROM programmed for the Digital FX Unit [0110221A.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC12F1571-I/SN programmed for the Digital FX Unit with potentiometer [0110221B.HEX] (Programmed Microcontroller, AUD $10.00)
  • Spin FV-1 digital effects IC (SOIC-28) (Component, AUD $40.00)
  • Firmware for the Digital FX Unit [0110221A.HEX] (Software, Free)
  • Digital FX Unit PCB patterns (PDF download) [01102211-2] (Free)
Articles in this series:
  • Digital FX (Effects) Pedal - Part 1 (April 2021)
  • Digital FX (Effects) Pedal - Part 1 (April 2021)
  • Digital FX (Effects) Pedal – Part 2 (May 2021)
  • Digital FX (Effects) Pedal – Part 2 (May 2021)
Items relevant to "Arduino-based MIDI Soundboard – Part 2":
  • 64-Key Arduino MIDI Shield PCB [23101211] (AUD $5.00)
  • 8x8 Tactile Pushbutton Switch Matrix PCB [23101212] (AUD $10.00)
  • Simple Linear MIDI Keyboard PCB [23101213] (AUD $5.00)
  • Firmware for the 64-Key Arduino MIDI Matrix (Software, Free)
  • Software for the Arduino MIDI Shield & 8x8 Key Matrix plus 3D keycap model (Free)
  • 64-Key Arduino MIDI Shield PCB pattern (PDF download) [23101211] (Free)
  • 8x8 Tactile Pushbutton Switch Matrix PCB pattern (PDF download) [23101212] (Free)
  • Simple Linear MIDI Keyboard PCB pattern (PDF download) [23101213] (Free)
Articles in this series:
  • Arduino-based MIDI Soundboard - Part 1 (April 2021)
  • Arduino-based MIDI Soundboard - Part 1 (April 2021)
  • Arduino-based MIDI Soundboard – Part 2 (May 2021)
  • Arduino-based MIDI Soundboard – Part 2 (May 2021)
  • Simple Linear MIDI Keyboard (August 2021)
  • Simple Linear MIDI Keyboard (August 2021)
Items relevant to "Variac-based Mains Voltage Regulation":
  • Variac-based Regulation Control Module PCB [10103211] (AUD $7.50)
  • Variac-based Regulation Control Module PCB pattern (PDF download) [10103211] (Free)
Articles in this series:
  • The History of Videotape – Quadruplex (March 2021)
  • The History of Videotape – Quadruplex (March 2021)
  • The History of Videotape - Helical Scan (April 2021)
  • The History of Videotape - Helical Scan (April 2021)
  • The History of Videotape – Cassette Systems (May 2021)
  • The History of Videotape – Cassette Systems (May 2021)
  • The History of Videotape – Camcorders and Digital Video (June 2021)
  • The History of Videotape – Camcorders and Digital Video (June 2021)

Purchase a printed copy of this issue for $10.00.

Digital FX Unit Our new DFX unit, introduced last month, can produce 15 different effects for musicians or recording technicians to customise their instruments and sounds. You can customise eight of those effects – and this article describes how to create and install different effects patches into the unit’s EEPROM. Part two – by John Clarke W hile we have included a great variety of pre- 1, 2 and 3 in the program listings. programmed effects in the EEPROM supplied for The assembler program for the selected effects patch can our new Digital FX Unit (adding to those already be downloaded from the site by choosing the cyan “Downpresent within the SPIN FV-1 chip), you might want to load SpinAsm” link at the bottom of the effect patch detail change some of these effects patches. area (see Screen1 opposite). That will ensure that the Digital FX unit has the effects If you want more programs, these are available directly you want. from the SPIN semiconductor website at www.spinsemi. Numerous effects patches can be freely downloaded. If com/programs.php you are an avid programmer, free software is available with graphical proPatch Effect Adjustment C Adjustment B Adjustment A gramming to write your own effects 1 Chorus-reverb Chorus mix Chorus rate Reverb mix patches. More on that later. 2 Flange-reverb Flange mix Flange rate Reverb mix To program the Digital FX unit’s 3 Tremolo-reverb Tremolo mix Tremolo rate Reverb mix EEPROM, you need an EEPROM programmer suitable for the 24LC32A. 4 Pitch shift ±4 semitones We will describe how you can do 5 Pitch echo Echo mix Echo delay Pitch shift this with a Microchip PICkit 2 or PICk6 Test it 3 programmer. Available effects patches But first, let’s look at the pre-made effects that are freely available. There is a reasonably comprehensive list at https://mstratman.github. io/fv1-programs/ In that set of listings, you can see details for each by selecting the “MORE” box. This additional information often includes details on the functions of VR7 (A control), VR6 (B control) and VR5 (C control) on the Digital FX unit. These are labelled as 38 Silicon Chip 7 8 Reverb 1 Reverb 2 Low filter Low filter 9 10 Octaver Pitch shift glider Down octave level Up octave level Glide Depth High filter High filter 11 Oil can delay Feedback Chorus width 12 Soft clip overdrive Tone Volume 13 Bass distortion Dry/wet mix Tone 14 Aliaser 15 Wah Filter Q Sensitivity 16 Faux phase shifter Feedback level Time Table 1: preprogrammed effects patches (9-16 can be changed) Australia’s electronics magazine Reverb time Reverb time Dry mix Rate Time rate Gain threshold Gain Sampling rate Reverb Speed width siliconchip.com.au ICSP header pin 24LC Function EEPROM pin 1 - MCLR / Vpp 2 8 Vdd (positive supply) 3 4 GND / Vss (0V) 4 - PGD (Data) 5 6 PGC/SCL (Clock) 6 5 SDA (Data) Table 2: ICSP header pin mapping From last month, where we had all the construction details for the Digital FX unit – here it is ready to mount in its diecast case. Inset above right is the ICSP header pin mapping, Table 2. You can download these files to any folder you like, as long as you remember where you put them. Collation Once you have all your selected effects patches, these will need to be collated in a form suitable for programming into the EEPROM. Each effects patch is placed into a separate 512 x 8-bit memory block, and there are eight such memory blocks in the 32kbit EEPROM. To generate the required data, you will need to use the Spin Semiconductor assembler called SpinAsm (Windows-only). SpinAsm can be downloaded from the Spin Semiconductor website linked above; it is called “SpinAsm assembler for the SPN1001 V1.1.31 (Windows executable)”. If you need more information regarding installing this program, see the installation guide later in this article. Once installed, move the saved effects patch files (.spn extension) to the “C:\Program Files (x86)\SpinAsm IDE\ spinsrc” folder. To open the SpinAsm program, right-click on the SpinAsm icon and select “Run as Administrator”. If you do not run as Administrator, your work will be not be saved. You will be asked whether you want this app to make Screen1: you can download a range of pre-made effects patches from the Spin Semi website as “SpinASM” files. These can then be compiled and uploaded to the EEPROM on the Digital FX Pedal. siliconchip.com.au changes to your computer. After clicking Yes, the program opens. Left-click on the “Open Project Dialog” icon just to the right of the Spin icon (see Screen2). This opens up a table of PROG0 to PROG7, where you can place the required effects patches, as shown in Screen3. To select the first effects patch, right-click on the PROG0 box in the (UNCHANGED-NO OVERWRITE) area and select Load File Entry from the project dialog box (Screen4). Select the required file from the “C:\Program Files (x86)\ SpinAsm IDE\spinsrc\” folder. Note that you can change the directories for file locations by selecting the tree icon just to the right of the project dialog icon (Screen5). However, we will describe the setup using the default directory locations, as shown. With the first patch selected (Screen6), use the same technique to load the patches for PROG1 to 7. You do not need to load all PROG locations if you don’t need all eight effects used. But the programs you wish to load need to start at PROG0 and continue with successive PROG locations. It is OK to have the UNCHANGED-NO OVERWRITE comment after the last program entry if you do not fill up all the possible programs. Screen2: use the Open Project Dialog button in SpinASM to load one of the effects patch ASM files you have downloaded. Australia’s electronics magazine May 2021  39 Screen3: when loading a SpinASM file, you will be prompted to select which of the eight available EEPROM slots it should go into. See our comments in the text about large (512-byte) patches needing to go into the last slot (PROG 7). Screen4: after right-clicking on one of the slots, you are presented with a menu. Select the “Load File Entry” option, and you will be prompted to choose a file to load into that slot. This is meant for use with the SPIN development board. It allows single-location programming without affecting the other programmed locations in EEPROM. We don’t use that feature, however. Once all the required programs are loaded, select the Save button and save the project under a suitable name. We named ours “SC Patches.spj” – see Screen7. Once saved, select the “Intel Hex” checkbox in the lowerleft portion of the project dialog box and then press the “Build” button. The HEX file will be saved to the “C:\ Program Files (x86)\SpinAsm IDE\hexout” folder. It will be named the same as the project saved, but with a .hex extension. In our example, it is “SC Patches.hex”. This is the file you need to program into the EEPROM. If the hex file and project file were not saved, that probably means that SpinAsm was not run as an Administrator. have an EEPROM programmer suitable for the 24LC32A, that would be the easiest way to do it. If you have a Microchip PICkit 2 or PICkit 3, you can program the EEPROM using free software that you can download from Microchip’s website. We are not using MPLAB X IPE, as we would for PICs, as it does not support this EEPROM. For PICkit 2 download the software. PICkit 2 Firmware V2.32 and user’s guide PICkit 2 Microcontroller Programmer User’s Guide Both can be found at: siliconchip.com.au/link/ab7w This is very similar to the PICkit 3 programming software that we now describe. The PICkit 3 is the successor to the PICkit 2, and while PICkit 2 is suitable for directly programming the 24LC32A EEPROM, the PICkit 3 requires some modifications. It also needs to be loaded with a PICkit 2 emulator to work. In this article, we describe how to program the EEPROM using the Microchip PICkit 3 programmer, as that is the one we think readers are most likely to have. We tested Programming the EEPROM There are several ways to program the EEPROM. If you Screen5: you can change the default folders where files are loaded and stored by the SpinASM, although we decided to stick with the defaults. 40 Silicon Chip Screen6: the SpinASM files have an extension of .spn, and here we have loaded the new octaver effect into the first slot, PROG 0. Australia’s electronics magazine siliconchip.com.au Screen7: a standard file dialog is presented when you opt to save your project (.spj file). Note that we have loaded all eight slots with different effects. Choose a memorable file name. Fig.1: we temporarily removed two components from the PICkit 3: diode TR3 at far left, and resistor R50 just above the programming socket. These interfere with EEPROM programming. Keep the parts as you can reinstall them later if you want to turn the PICKit 3 back into a PIC programmer. Note the original orientation of TR3 (cathode stripe towards PTC4). one clone version of PICkit 3, and found it would not connect correctly. Different clone versions might work, but we cannot recommend using anything but the genuine Microchip PICkit 3. The Digital FX unit includes an in-circuit serial programming connection (ICSP) suitable for programming the EEPROM. The PICkit 2 or PICkit 3 plugs directly onto the ICSP header. You might need to use jumper wires to make suitable connections to the ICSP header for other programmers. Table 2 shows the connections from the ICSP header pins to the EEPROM on the Digital FX Pedal PCB. EEPROM pin 7 is disabled and connected to GND. Pins 1, 2, 3 are the address pins and are connected to Vcc or Vdd, depending on the application. Screen8: this version of the PICkit 3 programming software can program EEPROMs. Note the message in the yellow shaded box indicating that it has detected the hardware. Screen9: use this menu option to load firmware into the PICkit 3 to emulate a PICkit 2. This is required to program the type of EEPROM we are using. siliconchip.com.au Modifying the PICkit 3 To enable the PICkit 3 to program the 24LC series of EEPROMs, TR3 (a diode) and R50 (a resistor) need to be removed from inside the PICkit 3. Crack open the case and locate the components. These are labelled on the PCB screen printing, as shown in Fig.1. Desolder these, taking note of TR3’s orientation and keep the parts in a safe place for replacing later on. The easiest way to do this is with a hot air rework station, gently heating the components while holding them with tweezers. Australia’s electronics magazine May 2021  41 Screen10: having selected the option shown in Screen9, the next step is to find the file shown here, This file is included with the software download and should be on your computer in the location described in the text. Screen11: with the PICkit 2 emulator loaded, select the 24LC EEPROM device from the Device Family menu. Screen13: with the programmer connected to the powered Digital FX Pedal, the Device selected and the HEX file loaded, click the Write button to program the effects into the EEPROM chip. You should be greeted with the Programming Successful message on a green background. Unplug the programmer and test all the effects to check that they are working as expected. However, you can also do it with a regular iron, by alternately heating the joints while holding it with tweezers, until the part comes loose. PICkit 2 programmer emulator Screen12: you can now select 24LC32A from the Device dropdown at upper left, then use the File menu to open the EEPROM HEX file you generated earlier. 42 Silicon Chip The software required to use the PICkit 3 to program the EEPROM can be downloaded here: siliconchip.com. au/link/ab7t If you aren’t sure how to install this software package, see the separate section below. Before starting the PICkit 3 programmer, you need to connect the PICkit 3 to the computer. This so that the program will run correctly at startup. Having installed the software linked above, navigate to C:\Program Files (x86)\Microchip\PICkit 3 v3\ and start the PICkit 3 application, or place a shortcut on your desktop and use that. The programming software will open, and state that the PICkit is connected (Screen8). Under the Tools menu, select “Download PICkit Operating System” (see Screen9). This is the PICkit 2 emulator. Select the file “C:\Program Files (x86)\Microchip\PICkit 3 v3\PK3OSV020005.hex” (installed with the software; see Screen10) and the PICkit 3 will be loaded with the required firmware. Then, in the Device Family menu, select EEPROMS and 24LC (Screen11). Next, find the 24LC32A entry under the Device dropbox (Screen12). Next, using the File menu, load the Spin.hex file locat- Australia’s electronics magazine siliconchip.com.au Screen15: do not be surprised if you get this error message upon closing the programming software. Click Quit. You might need to launch Task Manager (eg, by pressing Ctrl+Alt+Del) to kill the process if it lingers. Screen14 (left): after you have finished your EEPROM programming, if you want to revert the PICkit 3 to normal operation, in addition to refitting the two components removed earlier, you will have to select this menu option to re-load its original firmware. ed at “C:\Program Files (x86)\SpinAsm IDE\hexout\SC patches.hex” (or whatever name you saved it under). Once this file has been loaded, the EEPROM can be programmed. First, make sure one of the first eight effects is selected so the FV-1 chip will not access the EEPROM during programming. Then connect the PICkit 3 to the ICSP header, with its triangle to pin 1, and switch on power to the Digital FX Pedal. Do not select the option of target power via the PICkit. Then click the “Write” button to program the EEPROM – see Screen13. Before closing the program, in the Tools menu, select the “Revert to MPLAB mode” option to restore the PICkit 3 to normal operation, suitable for use with MPLAB (see Screen14). When closing this program, it is not unusual to see an “unhandled exception” dialog box appear, as shown in Screen15. Click “Quit” to close it. The program may take a while to close; you might have to force close it using Windows Task Manager. If you are finished programming, you can reinstall TR3 and R50 on the PICkit 3 board, to restore its full PIC programming function. Catch 22 If an effects patch fills the entire 512 x 8-bit memory block, it must be placed in the last used PROG position. Otherwise, that effect will not work, as its data will be corrupted. The catch is that you will not know as the corrupted file will have similar ending values to the other patches. The hex files are easily viewed in the PICkit 3 Programmer siliconchip.com.au software. Typical effects patches do not fill the entire 512 bytes, and the unused memory is filled with 00s and 11 at every 4th location. So a corrupted file will not be evident until it is tested and found not to work. Swapping the non-working patch to the end of the list by reordering the PROG selections should solve this. It also means that you can only use one effects patch that fills the entire allocated memory section. We found that the “Faux-phaser-2” patch did not work when it was placed in PROG6 position. Moving it to the PROG7 (last) position made it work. We then realised that the code for this patch filled the full 512 bytes. When this patch was in PROG6, the 512 bytes were not completely filled with code, showing that it was corrupted. Note that each PROG entry has its own address range. These are: • PROG0: 000 to 1FF • PROG1: 200 to 3FF • PROG2: 400 to 5FF • PROG3: 600 to 7FF • PROG4: 800 to 9FF • PROG5: A00 to BFF • PROG6: C00 to DFF • PROG7: E00 to FFF Home-grown effects Writing your own effects, or modifying existing effects patches, can be done using SpinAsm, or you can use a graphical programming package called SpinCAD Designer. You will need to do some reading to be conversant with how to write the required code. You can also load some of the already-written effects patches to use as examples. The SPIN Semiconductor website has much of the required information. It is recommended that you read the knowledge base section: siliconchip.com.au/link/ab7q This has information on the FV-1 architecture, instruction set, DSP basics and coding examples to list a few. You would also benefit from reading the data sheet and the user manual. These are found at siliconchip.com.au/link/ab7r and siliconchip.com.au/link/ab7s SpinCAD Designer SpinCAD Designer is an open-source Java project which allows the creation of patches for the Spin FV-1 audio DSP chip using graphical instead of text coding. SpinCAD is available from https://github.com/ HolyCityAudio/SpinCAD-Designer Australia’s electronics magazine May 2021  43 Installing SpinCAD Designer You can download SpinCAD from https://github.com/ HolyCityAudio/SpinCAD-Designer Click the green ‘download code’ button towards the upper righthand corner of the page (see Screen18), then select “Download ZIP”. Having downloaded the file, extract its contents to a suitable directory such as “C:\Program Files\SpinCad Designer”. Screen16: SpinCAD Designer allows you to design effects patches without having to write assembly language code. The graphical designer is easy to use, and once you know what you are doing, you can create an effect very quickly indeed. If you need help installing this, see the separate section on installation. Navigate to the SpinCAD Designer folder and open the Spin CAD-designer-1027 jar file. This will start SpinCAD Designer. Note that the patches folder for SpinCAD Designer includes many effects patch files that have already been written, in a compressed format. These are included as SpinCAD files as well, as SpinAsm files. These can be used as examples to get you started. The example shown in Screen16 is a test patch written for a ring modulator in Patch0. It includes a 6-band equaliser and ring modulator adjusted with Pot 0. It took me only a few minutes to create, and probably is not a very good effect, but it does show that the graphical program is very useful and effective for developing an effects patch. Once you have created a patch, it can be saved as an assembler file and then loaded into SpinAsm and converted to the Intel hex format using the “Save Patch as ASM” option in the File menu (see Screen17). Screen18: you need to extract the SpinCAD Designer software zip before you can use it. You can accept the default destination, as shown here, or alter it before continuing. To run SpinCAD, you will need the Java Runtime Environment JRE/JDK 1.8 or later installed. You can get this from www.java. com/en/download/ After downloading Java, run the executable file and agree to allow it to make changes to your device. Click through the following steps to install the Java runtime environment. Now you can navigate to the folder where you extracted SpinCAD Designer earlier, and launch the Spin CAD-designer-1027 jar file. Installing SpinAsm When you click on (or type in) the link to download SpinAsm, you might get a dialog box like the one shown in Screen 19. Screen17: once you have created your effect in SpinCAD Designer, select the “Save Patch as ASM” option to get a file that you can program into the Digital FX Pedal using the procedure described in this article. It’s also a good idea to use the “Save Patch” option to save it in a format that will allow you to make changes in future! 44 Silicon Chip Screen19: when you click the link to download Spin, depending on what web browser you are using, you will probably be faced with a save dialog something like this. You will need to click “Save File” and allow it to download before launching the installer. Australia’s electronics magazine siliconchip.com.au Select “Save File”, then once it has downloaded, open it. It might ask you whether you want this app (from an unknown source) to make changes to your computer. Select Yes; then, you can agree to the terms and conditions and select the standard setup option (Screen20). Screen20: the default options to install SpinAsm IDE will suit most users. Click Next to continue, then click Install (Screen21). Screen23: after SpinASM itself is installed, the driver installer will launch. Click Next to complete the setup. Installing the PICkit 3 Programmer software The software zip file (the link is under “PICkit 2 programmer emulator” in the main body of this article) is in a compressed format, often described as an archive. Open the file and select ‘extract all’, accepting the default folder (C:\ Users\<username>\Downloads\PICkit3 Programmer Application v3.10), as shown in Screen24. You can change the default extraction path if you like; it doesn’t matter since, once installation is complete, you can delete the folder entirely. Screen21: you can change the SpinAsm IDE installation folder, but we left it at the default. When you are prompted to install the driver (Screen22), click Next, then Finish (Screen23) and installation is complete. Screen24: now that it has been installed, you can click Finish and launch the software. Screen22: as part of the SpinAsm installation, you will also need to install the SpinAsm drivers, which will require you to click through some more permission dialogs. siliconchip.com.au With the box at the bottom ticked, the folder should appear as soon as the extraction process has finished. When that happens, launch the setup executable (normally done by double-clicking on the file). Use the default settings and file locations and agree to the conditions. The installer will ask permission to install the software. Upon clicking Yes, the installation will begin. When completed, close the installer. To save disk space and reduce clutter, after the installation has completed, you can delete the extracted installation folder, as the SC files will have been copied elsewhere on your system. Australia’s electronics magazine May 2021  45