The Compact 20-Pin USB Member
The PIC16F1458 is the small-memory member of the 20-pin USB pair: 4,096 words of flash ending at 0x0FFF, 512 bytes of SRAM, nine I/O lines, and the full analog set that the 14-pin PIC16F1454 lacks – nine channels of ten-bit ADC, an eight-bit DAC, two comparators and the CWG. Full-speed USB 2.0 with host clock recovery, two PWM modules, an EUSART and an MSSP complete the block. Despite the URL’s wording, there is no EEPROM on the family; the persistent region is the 128-byte High-Endurance Flash window at the top of the array (0x0F80-0x0FFF).
Lock And Boundary
CONFIG1 at 0x8007 with the single CP bit; ID at 0x8006. The sweep rules:
– 0x0000-0x0FFF: array, 0x000 under CP, 0xFFFF when erased. – 0x0F80-0x0FFF: HEF window, part of the array address space. – Above 0x0FFF: unmapped, also 0x000.
The 4K boundary is the trap on this part. A reader configured for the 8K PIC16F1459 invents a protected region above 0x0FFF; one configured for the 14-pin members mislabels the package. Identification always runs through the ID word first.
Image Anatomy
USB stack code dominates as on all 145x parts: endpoint descriptors with ASCII product strings, control-transfer handlers, HID or vendor-class logic. The analog layer is bigger than on the 1455 – nine scanned channels against the DAC and comparators – and the CWG usually drives a complementary output pair for charge or LED control. The 512-byte SRAM budgets tightly: double-buffered USB endpoints plus averaging accumulators leave little slack, and the compiler’s allocation shows as dense bank switching in the listing.
The Session
Identify via the ID word, read CONFIG1/CONFIG2, sweep 0x0000-0x0FFF over two-wire ICSP including the HEF tail, verify every word decodes legally. Nothing is erased; the part stays serviceable. The HEF window receives separate annotation because charge limits and calibration concentrate there across the product’s life – values a clone must reproduce exactly.
Deliverables
HEX at word addresses, annotated disassembly with USB, analog, CWG and HEF regions labeled, configuration report, checksum tied to the die. Clone policy – lock reproduced or omitted – is documented both as found and as applied.
Four Thousand Words With USB
The PIC16F1458 carries 4,096 words of flash, 512 bytes of SRAM, twenty pins with eighteen I/O, eleven ADC channels, a full-speed USB controller, two ECCP, one EUSART and two MSSP. There is no data EEPROM; a 128-byte high-endurance block at the top of the array covers persistent values.
A USB Stack In Four Kilowords
Fitting USB into 4K words forces hard choices: one configuration, two or three endpoints, no string descriptors beyond the mandatory ones, and a class implementation that is often vendor-specific rather than a standard class. The result is a compact and very readable image, and the vendor-specific requests are usually the only part a client needs translated, because they define the host protocol.
– Flash: 0x0000-0x0FFF (4K words), 0x3FFF erased, 0x0000 protected. – HEF: 128 bytes at the top of the array. – Configuration: 0x8007-0x8008, device ID 0x8006.
Vendor Requests As Protocol Documentation
Where no host-side source survives, the request handler in the firmware is the protocol specification: a switch on the request code, with the payload layout visible in the buffer offsets. The report reproduces that switch as a table of request codes and their expected payloads, which is usually enough for a client to write a compatible host driver.
Output
HEX at word addresses, the HEF block separately, annotated disassembly with the request handler table, configuration report, checksum tied to the die.
For the 8K 20-pin sibling, see the PIC16F1459 page; for the 14-pin parts, the PIC16F1454 and PIC16F1455 pages. To book a 1458 recovery, write to the services desk or the contact form.