Compare commits

...

7 Commits

Author SHA1 Message Date
ole00 6095042e5a img: updated afterburner image 2024-04-27 13:37:42 +01:00
ole00 99ccaa302f
Update README.md - additions for PCB 3.2 and afterburner v. 0.6.0 2024-04-27 13:08:13 +01:00
ole00 e400da6b10 PC app release 0.6.0 2024-04-27 11:39:55 +01:00
ole00 6c5ffab5be version increased to v.0.6 2024-04-27 11:37:10 +01:00
ole00 b9690e6945 added support for SPI RAM 2024-04-27 11:19:17 +01:00
ole00 1ac80bbb01 updated BOM for PCB 3.2b 2024-04-27 11:12:57 +01:00
ole00 28d8737780 new PCB design v. 3.2
* Optional voltage booster on the board which can replace
  the mt3608 module. If mt3608 module is used the area on
  the board under the module is left unsoldered.
* Optional SPI RAM for future use to support bigger GALs/CPLDs
  on the UNO board. Not currently used by any GAL.
* Support for 3.3V Arduinos by splitting the 5V power rail and
  IOREF power rail. Very old Arduino UNOs R2 without IOREF
  header pin can use a solder bridge JP1 (marked as Vx on the
  bottom of the board) to join the 5V rail and IOREF power rail.
* HW support for internal AREF which is used to measure VPP.
  There is an extra footprint on the bottom of the board
  to solder another attenuation resistor (R19). For example
  ESP32-S2-Mini based Arduinos with 2.5V internal analog
  reference can use 100k resistor as R19 to reduce the max.
  3V sensing value to 2.5V.
* ZIF18 and ZIF19 connected to the shift register output pins.
  This is for supporting other GALS and CPLDs (via adapter).
* added 100K pull down resitor R18 to ZIF15 (to complement the 10k
  pull-up). This is to ensure the pin is held low when the On
  switch (SW1) is opened. It is used for detection the On switch
  is closed when programming ATF150X via JTAG.
2024-04-26 16:30:47 +01:00
14 changed files with 1440 additions and 401 deletions

View File

@ -16,6 +16,15 @@ from various manufcaturers. It is based on work of several other people:
Michael Dreher:
https://github.com/nospam2000/afterburner.git
Marcelo Roberto Jimenez: (JTAG player)
https://github.com/mrjimenez/JTAG
whitequark · it: (ATF150X jed to svf tool)
https://github.com/whitequark/prjbureau
OpenOCD: (svf to xsvf tool)
https://github.com/arduino/OpenOCD/blob/master/contrib/xsvf_tools/svf2xsvf.py
who did the most of the hard work of deciphering and publishing the programming
protocol of these chips. Some of their early programs were Windows based and relied on
@ -23,6 +32,11 @@ presence of parallel port (LPT). Afterburner was written for Linux OS
(also works on Win32/64, Mac OSX64), and requires serial connection to
Arduino UNO, which does the programming of the GAL chip.
**Update: ver.0.6.0 added experimental support for ATF1502AS and ATF1504AS. Only
identify, erase and write commands are supported. Read function is unsupported.
Verification is usually done automatically - it is a part of the .xsvf JTAG file
which is used when writing the design. See Discussions for more information**
**Update: ver.0.5.8 improved calibration alogrithm and resolution for mcp4151 digi pot.
Please re-calibrate your Afterburner as the previsouly stored calibration data are invalid.**
@ -42,9 +56,13 @@ Supported GAL chips:
| 26CV12 | - | GAL26CV12B[2] | - | - |
| 26V12 | - | GAL26V12C[2] | - | - |
| 750 | ATF750C | - | - | - |
| 150X | ATF1502AS, ATF1502ASL, ATF1504AS, ATF1504ASL[2][3] | - | - | - |
[1]: requires PCB v.3.1 or modified PCB v.3.0 - see Troubleshooting
[2]: requires adapter - see gerbers, pcb and img directory
[3]: also supports 3.3V ATF1502ASV and ATF1504ASV when Arduino IOREF is 3.3V (ARM or ESP32 based Arduinos or Arduinos with IOREF 3.3V switch)
[-]: - represents either this combination does not exist or hasn't been tested yet. Testers are welcome to report their findings.
**This is a new Afterburner design with variable programming voltage control and with single ZIF socket for 20 and 24 pin GAL chips.**
@ -78,6 +96,9 @@ Setup:
./compile.sh to do that. Alternatively use the precompiled binaries in the 'releases' directory.
* Calibrate the variable voltage. This needs to be done only once, before you start using Afterburner for programming GAL chips.
Calibration procedure differs a little bit when using MT3608 module or when using on board voltage booster.
**When using MT3608 module**
* **Calibration step 1)** Turn the small potentiometer (R9) on the Afterburner to the middle position. This pot acts as compensation resistor for the digital pot.
@ -107,7 +128,18 @@ Setup:
* Note that if you use your calibrated Afterburner board with a different Arduino (made by a different company or slightly different design), you may need to re-do the calibration.
**When using on-board voltage booster:**
Calibration steps are the same as for MT3608 module with these differences
* **Calibration Step 2)** We can't turn the extra pot on the MT3608 module, but we can
adjust the voltage by turning the R9 pot on the Afterburner PCB. It's OK to have
the voltage a bit higher like 16.6V or so in this calibration step.
* **Calibration Step 3)** Because of the feedback resistance difference compared to MT3608
module the calibration index for 9V will be around value 150.
**GAL chip operations:**
* With the GAL chip inserted and power button pressed (or in ON position) check the chip identification by running the following command:
<pre>
./afterburner i -t [GAL_type]
@ -178,7 +210,7 @@ PCB:
The new design no longer has an etched PCB design available. The most convenient way to get the PCB is to order it online on jlcpcb.com, pcbway.com, allpcb.com or other online services. Use the zip archive stored in the gerbers directory and upload it to the manufacturer's site of your choice.
Upload the afterburner_fab_3_0.zip and set the following parameters (if required).
* Dimensions are 79x54 mm
* Dimensions are 85x54 mm
* 2 layer board
* PCB Thickness: 1.6, or 1.2
* Copper Weight: 1
@ -192,17 +224,33 @@ Soldering steps:
* start with the smallest parts, solder the resistors and small capacitors.
* solder the two ICS: U1 (digital pot) and U2 (shift register)
* solder the LED, the switch and the big capacitors
**When using MT3608 module**
* do **not** solder any components in voltage booster area
* **special step** solder a thin wire between the MT3608 module and the PCB hole marked as POT. See the image bellow.
* **Important** after you solder the wire measure the resistance between the wire's connection on Afterburner PCB and ground (use TP GND hole) - see red dots
on the picture beelow. It must be around 12.5 kilo Ohm. If it is very low value then you made a short while soldering the wire. Fix/remove the short
or else the MT3608 will be damaged when it is turned on on.
![POT wire image.](https://github.com/ole00/afterburner/raw/master/img/mt3608_wire.jpg "POT wire")
* solder the MT3608 module - the POT connection wire must be already soldered!
**When using on-board voltage booster**
* solder the parts in the voltage booster area. Start with the U3 IC - the SOT-23-6 package - so that you have plenty
of room for soldering the small IC. Use a flux to ensure the solder melts nicely on the pads.
* solder the inductor L1 and diode D2. Ensure D2 polarity is correct - the stripe is on the left side (see photos if unsure).
* solder the C10 cap and the resistors. There is no need to solder R10, R11, R12 if you are using the alternative booster IC
with SOT-23-5 package (without OVP)
* no extra wire is required (the wire is only required when using MT3608 module)
**After soldering the voltage booster**
* calibrate the board. See calibration steps in the Setup section.
* solder the ZIF socket
![POT wire image.](https://github.com/ole00/afterburner/raw/master/img/mt3608_wire.jpg "POT wire")
MT3608 modules:
---------------
* On PCB version 3.2 (or higher) the MT3608 can be replaced by discrete parts soldered on the board. Therefore, if you want to avoid possible issues with
MT3608 modules, solder the discreate parts instead of the module. If you are not comfortable soldering SOT-23-6 SMT IC package, then use the MT3608 module.
* There is a report some of the MT3608 modules / clones are not compatible with Afterburner. Thanks @meup for the information.
* The incompatible MT3608 'clone' causes calibration issue and basically breaks the variable voltage functionality. This can be fixed by replacing the 2k2 resistor located on the module by a 15k resistor.
* Bellow is the image of the old (compatible without a mod) and new (require the resistor mod) MT3608 modules. If you happen to have the incompatible module here are the steps to replace the resistor:
@ -303,6 +351,14 @@ Troubleshooting:
- I have the older Afterburner PCB design, can I use the new PC software and Arduino sketch?
* Yes, both programs are compatible with the old Afterburner boards (1.X and 2.X).
- how do I program ATF150X ICs? They do not fit into the ZIF Socket.
There are 2 options. Either use PLCC44 IC package along with the ZIF socket adapter (see the gerber and
pcb directory). Or you can program the ATF150X on your target board when using JTAG interface.
See this schematics for information about JTAPG pins on ATF150X ICs:
http://matthieu.benoit.free.fr/all03/adp/HiLo_ADP-ATF1504.PDF
The OGI pin in the schematic is VPP (or EDIT) pin on afterburner. See afterburner schematics
how to connect JTAG pins from the ZIF socket into the JTAG pins on your board.
- what are the .jed files and how to produce them
* Use WinCUPL software from Atmel. Works under Wine as well.
@ -312,6 +368,17 @@ Troubleshooting:
* WinCUPL User's manual: http://ww1.microchip.com/downloads/en/DeviceDoc/doc0737.pdf
* Try GAL Asm to produce .jed files - see link bellow.
- can I use .jed files with ATF150X IC?
* Not directly. You have to convert the .jed file into .xsvf format. Use the python tools located in the utils/jtag
subdirectory to do that. See readme.txt in that directory for more info. Once you convert the .jed to .xsvf
you can use it with afterburner like that:
<pre>
./afterburner -t ATF1502AS -f mydesign.xsvf ew
</pre>
which will erase the chip and then write your design into the IC.
See discussion #64 (ATF1502AS(L) and ATF1504AS(L) support) for more inofrmation.
Other GAL related links:
------------------------

195
aftb_seram.h Normal file
View File

@ -0,0 +1,195 @@
#ifndef _AFTB_SERAM_
#define _AFTB_SERAM_
/* Serial RAM functions for Afterburner GAL project.
Uses 23LC512 or 23LC1024 RAM IC
3 devices are connected to the serial bus: digi-pot, shit register and this serial RAM.
Digi pot and shift register have their own dedicated CS pins. Serial RAM CS is active (low)
when no other device is selected. Therefore, the serial RAM is always selected unless any other
device is explicitely selected (in that case serial RAM is de-selected by onboard HW)
Reading or Writing of 1 byte takes ~ 620 uSec for 24bit addressing and ~ 500 uSec for 16bit addressing
*/
//set default pins
#ifndef SHR_CS
#define SHR_CS A2
#endif
#ifndef RAM_CLK
#define RAM_CLK A4
#endif
#ifndef RAM_DAT
#define RAM_DAT A5
#endif
#define CS_DELAY_US 16
#define OPCODE_WRITE 2
#define OPCODE_READ 3
#define OPCODE_RDMR 5
#define OPCODE_WRMR 1
#ifndef RAM_BIG
#define seRamInit() 0
#else /* RAM_BIG */
uint8_t ramAddrBits24 = 0;
static void seRamWriteData(uint16_t data, uint8_t bitLen ) {
uint16_t mask = (1 << (bitLen-1));
while (bitLen) {
bitLen--;
//set data bit
digitalWrite(RAM_DAT, (data & mask) ? 1 : 0 );
//raise the clock
digitalWrite(RAM_CLK, 1);
//do some operation
data <<= 1;
//lower the clock
digitalWrite(RAM_CLK, 0);
}
}
static uint8_t seRamReadData(void) {
uint8_t bitLen = 8;
uint8_t result = 0;
while (bitLen) {
result <<= 1;
//raise the clock
digitalWrite(RAM_CLK, 1);
//set data bit
result |= digitalRead(RAM_DAT);
//do some operation
bitLen--;
//lower the clock
digitalWrite(RAM_CLK, 0);
}
return result;
}
static void seRamWrite(uint16_t addr, uint8_t data ) {
//ensure clock is low
digitalWrite(RAM_CLK, 0);
// toggle the SHR CS to reset the bus for serial RAM
digitalWrite(SHR_CS, 0);
delayMicroseconds(CS_DELAY_US);
digitalWrite(SHR_CS, 1);
seRamWriteData(OPCODE_WRITE, 8); // 8 bits of WRITE opcode
if (ramAddrBits24) {
seRamWriteData(0, 8); // top 8 bit of address are 0
}
seRamWriteData(addr, 16); // 16 bits of address
seRamWriteData(data, 8); // 8 bits of actual data
}
static uint8_t seRamRead(uint16_t addr) {
uint8_t data;
//ensure clock is low
digitalWrite(RAM_CLK, 0);
// toggle the SHR CS to reset the bus for serial RAM
digitalWrite(SHR_CS, 0);
delayMicroseconds(CS_DELAY_US);
digitalWrite(SHR_CS, 1);
seRamWriteData(OPCODE_READ, 8); // 8 bits of READ opcode
if (ramAddrBits24) {
seRamWriteData(0, 8); // top 8 bit of address are 0
}
seRamWriteData(addr, 16); // 16 bits of address
pinMode(RAM_DAT, INPUT);
data = seRamReadData();
pinMode(RAM_DAT, OUTPUT);
return data;
}
static void seRamSetupMode(void) {
uint8_t data;
//ensure clock is low
digitalWrite(RAM_CLK, 0);
// toggle the SHR CS to reset the bus for serial RAM
digitalWrite(SHR_CS, 0);
delayMicroseconds(CS_DELAY_US);
digitalWrite(SHR_CS, 1);
seRamWriteData(OPCODE_RDMR, 8); // 8 bits of Read Mode register
pinMode(RAM_DAT, INPUT);
data = seRamReadData();
pinMode(RAM_DAT, OUTPUT);
#if 0
Serial.print(F("RAM mode:"));
Serial.println(data, DEC);
#endif
if (data == 0) {
return;
}
//switch to byte mode
// toggle the SHR CS to reset the bus for serial RAM
digitalWrite(SHR_CS, 0);
delayMicroseconds(CS_DELAY_US);
digitalWrite(SHR_CS, 1);
seRamWriteData(OPCODE_WRMR, 8); // 8 bits of Read Mode register
seRamWriteData(0, 8); //write mode 0
}
static uint8_t seRamInit(void) {
uint8_t r;
#if 0
pinMode(SHR_CS, OUTPUT);
pinMode(RAM_CLK, OUTPUT);
pinMode(RAM_DAT, OUTPUT);
#endif
seRamSetupMode();
//try 16bit addressing mode (64kb RAM)
ramAddrBits24 = 0;
// detect SRAM presence by writing and reading data
seRamWrite(0, 0x5A);
r = seRamRead(0);
#if 0
Serial.print("r:");
Serial.println(r, DEC);
#endif
if (r != 0x5A) {
// try 24 bit addressing mode (128kb RAM)
ramAddrBits24 = 1;
seRamWrite(0, 0x5A);
r = seRamRead(0);
if (r != 0x5A) {
return 0;
}
}
seRamWrite(0xFFFF, 0xA5);
r = seRamRead(0xFFFF);
if (r != 0xA5) {
return 0;
}
//verify the data at address 0 still exists
r = seRamRead(0);
return (r == 0x5A) ? (ramAddrBits24 + 1) : 0;
}
#endif /* RAM_BIG */
#endif /*_AFTB_SERAM_*/

View File

@ -37,7 +37,7 @@
*/
#define VERSION "0.5.8"
#define VERSION "0.6.0"
//#define DEBUG_PES
//#define DEBUG_VERIFY
@ -463,6 +463,7 @@ static void printFormatedNumberHex2(unsigned char num) ;
#include "aftb_vpp.h"
#include "aftb_sparse.h"
#include "aftb_seram.h"
// share fusemap buffer with jtag
#define XSVF_HEAP fusemap
@ -676,8 +677,6 @@ void setup() {
// inserting the GAL IC into socket.
setupGpios(INPUT);
printHelp(0);
if (varVppExists) {
// reads the calibration values
if (varVppCheckCalibration()) {
@ -686,7 +685,14 @@ void setup() {
// set shift reg Chip select
pinMode(PIN_SHR_CS, OUTPUT);
digitalWrite(PIN_SHR_CS, 1); //unselect the POT's SPI bus
//setup serial RAM
if (seRamInit()) {
Serial.println(F("I: SeRAM OK"));
}
}
printHelp(0);
Serial.println(">");
}

32
bom.txt
View File

@ -1,8 +1,8 @@
BOM for Afterburner PCB 3.1
BOM for Afterburner PCB 3.2b
============================
* (R1 - 4x) Resistor 4k7 (TH or SMT 0805) 0.25W, 5% or better tolerance - 4x
* (R1 - 5x) Resistor 4k7 (TH or SMT 0805) 0.25W, 5% or better tolerance - 5x
* (R8, R4) Resistor 10k (TH or SMT 0805) 1% or better tolerance - 2x
* (R5) Resistor 100k (TH or SMT 0805) 1% or better tolerance - 1x
* (R5, R18) Resistor 100k (TH or SMT 0805) 1% or better tolerance - 2x
* (R6) Resistor 20k (TH or SMT 0805) 1% or better tolerance - 1x
* (R7, R3, R2) Resistor 3k3 (TH or SMT 0805) 1% or better tolerance - 3x
* (R9) Cermet trimmer (TH Suntan TSR-3362P-202R 2k) - 1x
@ -26,3 +26,29 @@ BOM for Afterburner PCB 3.1
* 40 Pin Male Single Row Strip 2.54mm Pin Header Connector 0.1" Straight - 1x
* Arduino UNO
OPTIONAL features
-----------------
on-board voltage booster (replacement for MT3608 module)
* (R10, R13 ,R14) Resistor 100k (TH or SMT 0805) 1% or better tolerance - 3x
* (R11) Resistor 4k7 (TH or SMT 0805) 0.25W, 1% or better tolerance - 1x
* (R12) Resistor 3k3 (TH or SMT 0805) 1% or better tolerance - 1x
* (C10) Capacitor ceramic 1uF, 9V or higher (TH or SMT 0805) - 1x
* (D2) Diode Schottky SK14, 1A 40V (SMT package DO-214AC-2 )
or alternative TH Schottky diode 1N5818
* (L1) Inductor 10uH, NLCV32T-100K-PF (SMT package 1210)
or alternative TH: AICC-02-100K-T Axial inductor
* (U3) Voltage booster MIC2619 (SOT-23-6) with over voltage protection (OVP)
or alternative MIC2250 (SOT-23-5) without OVP, R10, R11 and R12 not required
or possibly TPS61040DBVR (SOT-23-5) without OVP - not tested yet
SPI-RAM: extra memory for UNO (not used ATM. Can be soldered later if needed)
* (R15, R16) Resistor 10k (TH or SMT 0805) 5% or better tolerance - 2x
* (R17) Resistor 4k7 (TH or SMT 0805) 0.25W, 5% or better tolerance - 1x
* (C11) Capacitor ceramic 100nF 10V or higher (TH or SMT 0805) - 1x
* (Q2,Q3) N-MOSFET (SMT: BSS138P - SOT23 or TH: BS170G - TO92, or similar) - 2x
* (U4) SPI-RAM 5V, 23LC1024, DIP or SOIC-8, alternative 23LC512 or 23LCV512 or 23LCV1024

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -48,7 +48,7 @@ To compile: gcc -g3 -O0 -o afterburner afterburner.c
#include "serial_port.h"
#define VERSION "v.0.5.8"
#define VERSION "v.0.6.0"
#ifdef GCOM
#define VERSION_EXTENDED VERSION "-" GCOM