infoic.py is a read-only query tool for the device databases shipped with
minipro. It parses the XML that
minipro uses to describe every supported chip, decodes the packed bitfields
into human-readable values, and answers questions about the database without
talking to any hardware.
It is a faithful port of the relevant parts of minipro's src/database.c and
src/functions.c, including the programmer-specific voltage tables and the
per-section availability rules.
$ ./infoic.py --name M2716 --show-voltages --show-availability
Manufacturer Device Type Pins CodeSize Bus VDD VCC VPP Available on
--------------------------------------------------------------------------------------------------
INTEL M2716@DIP24 (E)EPROM 24 0x800 x8 5 5 21 TL866A, TL866CS
INTEL M2716@DIP24,M2716M@DIP24 (E)EPROM 24 0x800 x8 5 5 18 II+, T48, T56
The minipro XML database is a compressed representation: a single <ic> tag
packs a dozen bitfields into a handful of integer attributes. Answering
questions like "which 24-pin EPROMs run at 21 V VPP?" or "which of my
TL866II+ chips does minipro not support?" requires unpacking those fields,
and minipro -q only shows one device at a time.
infoic.py unpacks the whole file, resolves the same per-programmer voltage
tables that minipro uses internally, and exposes the result through a small
filter/query language.
- Python 3.10 or later (uses
X | Ytype unions andfrom __future__ import annotations). - The
infoic.xmlfile that ships with your minipro installation. Common locations:./infoic.xml(the default)$MINIPRO_HOME/infoic.xml/usr/local/share/minipro/infoic.xml/usr/share/minipro/infoic.xml
No third-party Python packages are needed.
infoic.py [XML] [--database SECTION] [filters] [--format table|json]
XML is optional and defaults to ./infoic.xml. Examples:
# Every device in the default section (INFOIC2PLUS)
./infoic.py
# Filter by name, case-insensitive substring
./infoic.py --name M2716
# Exact pin count, with voltage and availability columns
./infoic.py --pins 24 --show-voltages --show-availability
# Everything AMD makes that runs at 21 V VPP
./infoic.py --manu AMD --vpp 21
# Only T48-supported parts with 16-bit bus
./infoic.py --prog T48 --query "flags.word_size=2"
# Dump matching records as JSON
./infoic.py --name 27C256 --format json
# Statistics for the whole section
./infoic.py --stats
infoic.xml contains multiple <database> elements, one per programmer
family:
| Section | Programmer(s) | Voltage tables |
|---|---|---|
INFOIC |
TL866A, TL866CS | tl866a_vcc/vpp_voltages |
INFOIC2PLUS |
TL866II+, T48, T56 | tl866ii_* or xg_* (below) |
INFOICT76 |
T76 | xg_vcc/vpp_voltages |
The same chip can appear in more than one section with different field
values — TMS2716 exists in all three, K8P2716U only in INFOIC2PLUS.
INFOIC2PLUS is shared by three programmers, distinguished per record by
the pin_map flags. Which voltage table applies depends on which
programmer you're asking about:
| Requested programmer | VCC table | VPP table |
|---|---|---|
| TL866II+ | tl866ii_vcc_voltages |
tl866ii_vpp_voltages |
| T48, T56 | xg_vcc_voltages |
xg_vpp_voltages |
| T76 | xg_vcc_voltages |
xg_vpp_voltages |
Use --database to pick a section explicitly, or --list-databases to see
what the file contains:
./infoic.py --list-databases
# INFOICT76
# INFOIC2PLUS
# INFOIC
--prog filters devices by programmer availability, mirroring the
Available on: line that minipro -q prints.
./infoic.py --prog TL866II+
./infoic.py --prog T48 --prog T56 # union
./infoic.py --prog TL866A --name 27C256
It implies --database when all requested programmers share one section:
--prog TL866Aor--prog TL866CS→--database INFOIC--prog TL866II+,T48, orT56→--database INFOIC2PLUS--prog T76→--database INFOICT76
For INFOIC2PLUS, the per-record pin_map flags decide. Records with no
flags set are available on all three programmers — this is minipro's own
fallback in print_device_info(), not a bug. Records with a flag set are
available only on the corresponding programmers.
--show-availability adds an Available on column with short tags
(II+, T48, T56, TL866A, TL866CS, T76), matching the banner
minipro prints.
All filters are optional and AND-combined.
| Option | Meaning |
|---|---|
--manu NAME |
Manufacturer substring (case-insensitive) |
--name SUBSTR |
Device name substring (case-insensitive) |
--type N |
1=EEPROM 2=MCU 3=PLD 4=SRAM 5=LOGIC 6=NAND 7=EMMC 8=VGA |
--pins N |
Exact pin count |
--pins-min N |
Minimum pin count |
--pins-max N |
Maximum pin count |
--min-code N |
Minimum code_memory_size (accepts 0x...) |
--max-code N |
Maximum code_memory_size |
--vdd VOLTS |
VDD resolved to real volts (e.g. 5, 3.3) |
--vpp VOLTS |
VPP resolved to real volts (e.g. 12.5, 21) |
--plcc |
Only PLCC-packaged parts |
--dip |
Only native-DIP parts |
--icsp |
Only parts with ICSP support |
--prog P |
Only parts available on programmer P (repeatable) |
Voltage filters are decoded against the table for the selected section and
--prog; --vdd 6.25 matches the XG-family decode of nibble 0x0e, which
TL866II_VCC cannot represent.
--query takes a small expression and may be repeated; all expressions are
AND-combined with the other filters.
./infoic.py --query "package.pin_count=20"
./infoic.py --query "voltages.vpp=0"
./infoic.py --query "flags.word_size=2"
./infoic.py --query "manufacturer~ATMEL"
./infoic.py --query "package.plcc=True"
./infoic.py --query "code_memory_size>=65536"
./infoic.py --query "pin_map.prog_flags=0"
Operators: = != < <= > >= ~ (~ is case-insensitive substring).
Paths are dotted and resolve against the Device dataclass. Anything
reachable by attribute access works:
flags.*—word_size,data_org,can_erase,has_chip_id,read_only, …voltages.*—vdd,vcc,vpp,vdd_volts,vpp_volts,vdd_meaningful, …package.*—pin_count,adapter,icsp,plcc,smd,is_dipprotocol.*—protocol_id,custom_protocolpin_map.*—raw,zif_map,prog_flags- top-level —
name,manufacturer,type,code_memory_size,chip_info,db_type
Bare expressions are evaluated for truthiness, so --query "flags.read_only"
returns every read-only device.
./infoic.py --name M2716 --database INFOIC --show-voltages --show-availability
Optional columns:
--show-adapter— the adapter byte as a name (TSOP48,SOP44, …)--show-voltages—VDD,VCC,VPP. VDD and VCC share the VCC pin (programming vs. read rail); VPP is its own pin.?in a cell means the record has a nibble that the current table cannot resolve.--show-availability—Available onwith short tags.
./infoic.py --name 27C256 --format json
One object per matching <ic>, with all decoded fields as nested objects.
./infoic.py --stats
./infoic.py --manu ATMEL --stats # respects all filters
Prints totals, breakdowns by type/pin count/adapter/bus width, and counts for PLCC, DIP, ICSP and custom-protocol parts.
--list-databases— list<database type=...>sections and exit--list-manus— list all manufacturers and exit
Each <ic> becomes a Device:
Device
├── name, manufacturer, type, db_type
├── code_memory_size, data_memory_size, data_memory2_size
├── page_size, pages_per_block, chip_id, chip_id_bytes_count
├── chip_info, variant, pulse_delay, config
├── PackageDetails
│ ├── pin_count, pin_count_raw, adapter, adapter_name
│ ├── icsp, plcc, smd, is_dip
├── Voltages
│ ├── vdd, vcc, vpp (raw nibbles/byte)
│ ├── vdd_volts, vcc_volts, vpp_volts (resolved)
│ ├── vdd_meaningful, vpp_meaningful
│ ├── has_power_down, is_powerdown_disabled, atf_in_pal_compat_mode
├── Flags
│ ├── can_erase, has_chip_id, has_data_offset, off_protect_before
│ ├── protect_after, lock_bit_write_only, has_calibration
│ ├── prog_support, data_org, word_size
│ ├── can_adjust_vcc, can_adjust_vpp, has_power_down
│ ├── is_powerdown_disabled, reversed_package, custom_protocol, read_only
├── Protocol
│ ├── protocol_id, custom_protocol
├── PinMap
│ ├── raw, zif_map, prog_flags
│ ├── supports_tl866ii, supports_t48, supports_t56
├── compare_mask, word_size_from_chip_info
Available on is exposed as Device.available_on (list) and
Device.available_on_short (comma-joined string).
Where minipro has a per-programmer behaviour, infoic.py reproduces it:
- Voltage tables are selected per section and per
--prog, matching theswitch (db_data->prog_version)block inload_mem_device. - Availability mirrors
print_device_infoinfunctions.c, including the flagless → all-three fallback forINFOIC2PLUS. - Word/bus width uses
MP_DATA_ORG→word_size = 2 if data_org else 1. The table renders this asx8/x16; the JSON keepsword_sizein bytes. - SPI-NAND geometry fix-up is applied for
INFOICT76/INFOIC2PLUS(and skipped forINFOIC), matching the C code'sversion != INFOIC_DATABASEguard. - TL866A / TL866II+ / XG voltage tables are transcribed verbatim from
database.c, including the 21 V and 25 V entries that only the XG family has.
Where minipro's behaviour is programmer-dependent and you ask about several
at once, infoic.py picks the superset (XG) so that, e.g.,
--prog T48 --prog T56 decodes correctly.
Some upstream infoic.xml files contain comments with -- inside them,
which XML 1.0 forbids. minipro's custom xml.c parser tolerates this;
Python's xml.etree does not. infoic.py rewrites -- to - inside
comment bodies before parsing, so such files load without error and without
altering any data.
iter_database_sections/pick_section— multi-section XML handlingiter_devices— one section →DeviceobjectsVoltages.from_raw,Flags.from_raw,PackageDetails.from_raw,Protocol.from_raw,PinMap.from_raw— bitfield unpacking_spi_nand_fixup,_compare_mask_and_word_size,_id_bytes_count— post-load adjustments ported fromload_mem_device_prog_match,apply_query,filter_devices— filteringprint_table,print_json,print_stats— output
- Read-only. Editing the XML is not supported.
- The
INFOIC(TL866A) VPP/VCC tables are the ones from upstream. They differ from the newer families; the tool selects them per section. - Only
INFOIC/INFOIC2PLUS/INFOICT76sections are handled.LOGICandALGORITHMSsections, which live inlogicic.xmlandalgorithm.xml, are not parsed. - The T76 PLD VPP table (
xg_pld_vpp_voltages) is the same asxg_vpp_voltagesfor all currently-known entries; if they diverge in future XML,DB_TABLES["INFOICT76"]will need achip_typeswitch.
Same terms as minipro itself (GPL v3 or later), since large parts are a direct port of its source.