diff --git a/README.md b/README.md index a259006..048413a 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,34 @@ delivery, use the command `power on` from the control utility. If you always want this, try `power on perm`. Note that power is supplied out a separate pin that is normally not used, so this is generally safe to keep enabled. +## Programming the chips + +The process needed to program these is pretty unobvious. Here's what I do: + +- Create a logic file in [WinCUPL](https://www.microchip.com/en-us/products/fpgas-and-plds/spld-cplds/pld-design-resources). + You should get a .JED output. +- Use ATMISP7 (same link) to translate this to a .svf + - Create a new one-device chain + - Set the device name appropriately + - Select "Program/Verify" as the JTAG instruction + - Select your .JED file as the "JEDEC File" + - Choose "Write SVF file" +- Program using openocd: + +``` +openocd -f /usr/share/openocd/scripts/interface/jlink.cfg \ + -c "adapter speed 400" \ + -c "transport select jtag" \ + -c "jtag newtap ATF1502AS tap -irlen 3 -expected-id 0x0150203f" \ + -c init \ + -c "svf FILENAME.svf" \ + -c "sleep 200" \ + -c shutdown +``` + +Note that the chip name and ID in this command don't actually need to match +(they may be able to be removed entirely). + ## License/copyright Intellectual property is bullshit. This is everyone's design.