Make Your Own Microchips!

by Doctor Volt in Circuits > Electronics

11481 Views, 10 Favorites, 0 Comments

Make Your Own Microchips!

thumb.png

Have you ever been missing an IC while tinkering with electronics? No problem, just make the chip yourself. Programmable logic devices, or PLDs for short, are available for this purpose. With a computer, an Arduino UNO or Nano and a few electronic parts, you can easily give them any (logic) function you want. 

Supplies

  • Arduino UNO or Nano
  • Optional: Generic Transistors, 1xNPN, 1xPNP
  • Resistors: 5x4k7, 3x10k, 1x1k to 10k
  • Wires etc.
  • Breadboard, Prototype board or custom made PCB
  • One of these PLDs:
  • Atmel ATF16V8B, ATF22V10B, ATF22V10CQZ Important: ATF16V8C is NOT supported
  • Lattice GAL16V8A, GAL16V8B, GAL16V8D
  • Lattice GAL22V10B
  • National GAL16V8
  • Lattice GAL20V8B

Get the Afterburner

Make Your Own Microchips!

First you need to clone the "Afterburner" repository from Github: https://github.com/ole00/afterburner.This contains a schematic, an Arduino sketch and a small command line tool for Windows. Watch the video to learn more about PLDs. Watch the video to learn more about PLDs and their programming.

Build the Circuit

schem_gal16v8.png
prg_circ.PNG
breadbord_1.42.1.jpg

Build the circuit on a breadboard or make/order PCB from the gerber files in the project. While it is being written, the PLD needs a voltage of 10..14 volts at pin 2. This comes from a step-up converter with control input. However, I could not find these anywhere and to add one as described in the readme was too fiddly for me. As a wokaround, you can use small circuit made of two generic transistors. This has to be put between Pin 11 of the Arduino (VPP_EN) and Pin 2 of the PLD (Edit). At last set the programming voltage to 10V (Atmel ATF) or 12V (Lattice GAL)

Test the Circuit

Now upload the Arduino Sketch to your Arduino and open a command line. Assuming that you are using a GAL16V8 from Lattice and the Arduino is connected to COM5, type

afterburner -d COM5 -t GAL16V8 i


You should see something like this:

testing gal 1
PES raw bytes:
00 05 1A A1 CD A4 03 06 00 00
PES info: 5V Lattice GAL16V8 VPP=12.0 Timing: prog=40 erase=25


Congratulation, the circuit works and the PLD is ready for programming.

Write and Compile the CUPL File

Screenshot 2022-07-28 181145.png
Screenshot 2022-07-28 181145.png

Download WinCUPL from the Microchip homepage. Now open the example C:\Wincupl\Examples\Atmel\GATES.PLD. This implements all kind of logic chips. There is also an example for a 4-bit binary counter (COUNT10.PLD), which I used as a basis for the 7-segment dislpay driver I showed in the video. To get the JDEC file, go to Run->Device Dependent Compile, type F9 or click the button in the tool bar. When done, you get the JDEC file "gates.jed" in the same folder like the PLD file.

Burn the JDEC File Into the PLD

Screenshot 2022-07-28 183753.png

On the commandline type

afterburner -d COM5 -t GAL16V8 d

To delete the whatever is already in the PLD. This has to be done every time the chip will be programmed. New chips have to be formatted in this way.

Then write the JDEC file to the PLD with

afterburner -d COM5 -t GAL16V8 -f C:\Wincupl\Examples\Atmel\GATES.JED w

and check if everything went well:

afterburner -d COM5 -t GAL16V8 -f C:\Wincupl\Examples\Atmel\GATES.JED v

Optionally you can read out and dump the JDEC file:

afterburner -d COM5 -t GAL16V8 -f C:\Wincupl\Examples\Atmel\GATES.JED v


Your PLD is ready to use, now.