Archive for the ‘Recover Chip’ Category

PostHeaderIcon Retrieve Protected PIC18F4520 Program Memory Data

To retrieve protected PIC18F4520 program memory data you must plan for what the missing firmware will do, because the recovered image drives more of the board than a smaller sibling. The PIC18F4520 belongs to the PIC18F2420/2520/4420/4520 family: 32 KB of program memory, 1536 bytes of RAM, a 256-byte data EEPROM, a 13-channel 10-bit ADC, a Parallel Slave Port and four timers in a 40-pin package at 40 MHz. A partial image is not merely incomplete, it can leave hardware driven unsafely.

защитена микропроцесорна програма за флаш памет PIC18F4520 и извличане на данни от паметта на eeprom трябва да декапсулира силиконов пакет на заключен бит на предпазителя на микроконтролера PIC18F4520, да разбие MCU PIC18F4520 система за устойчивост на фалшифициране и да копира вградения фърмуер във формат двоичен или шестнадесетичен;

защитена микропроцесорна програма за флаш памет PIC18F4520 и извличане на данни от паметта на eeprom трябва да декапсулира силиконов пакет на заключен бит на предпазителя на микроконтролера PIC18F4520, да разбие MCU PIC18F4520 система за устойчивост на фалшифициране и да копира вградения фърмуер във формат двоичен или шестнадесетичен;

The coverage map of a 32 KB branch member

A missing kilobyte on a small part is a dead device; here the same gap is a board with undefined outputs, because the recovered code drives the analogue front end, parallel bus and timing outputs, and where it stops they stay as reset left them. The PIC18F4520 safe peripheral state after recovery is therefore part of the deliverable. The PIC18F4520 32 KB coverage map spans the 2 KB boot block at 0x000000-0x0007FF under CPB, then user blocks 0 through 3 at 0x000800-0x001FFF, 0x002000-0x003FFF, 0x004000-0x005FFF and 0x006000-0x007FFF, each under its own CP bit.

Microprocessor PIC18F4520 Program Memory Data Retrieving

Microprocessor PIC18F4520 Program Memory Data Retrieving

Reading the configuration word before the array

Configuration registers live at 0x300000 onward. CONFIG5L holds CP3 through CP0, CONFIG5H holds CPD and CPB, CONFIG6L holds WRT3 through WRT0, CONFIG6H holds WRTD, WRTB and WRTC, and CONFIG7L and CONFIG7H carry EBTR. A protection bit reads 1 when its region is open and 0 when it is locked, because programmed bits are zeros. All four CP bits describe real silicon, so the decoded word states what the array returns.

Write-side locks, entry conditions and the erase decision

Write-side state matters as much. WRT3 through WRT0 block programming of their blocks, WRTC protects the configuration registers, and CPD protects the 256-byte data EEPROM, which sits outside the flash array and can be readable while code is not. Chip erase is the only documented way to clear read protection, and it destroys program memory and EEPROM in one operation. Entry conditions decide whether the word can be trusted: ICSP entry requires a reset, LVP in CONFIG1H lets PGM activate without high voltage on MCLR/VPP, and MCLRE decides whether that pin is a reset line or an I/O pin. A failed entry produces an empty buffer identical to a locked device.

zabezpieczony program pamięci flash mikroprocesora PIC18F4520 i pobieranie danych z pamięci eeprom wymaga dekapsulacji pakietu krzemowego zablokowanego bitu bezpiecznika mikrokontrolera PIC18F4520, złamania układu odporności na manipulacje MCU PIC18F4520 i skopiowania wbudowanego oprogramowania w formacie binarnym lub szesnastkowym;

zabezpieczony program pamięci flash mikroprocesora PIC18F4520 i pobieranie danych z pamięci eeprom wymaga dekapsulacji pakietu krzemowego zablokowanego bitu bezpiecznika mikrokontrolera PIC18F4520, złamania układu odporności na manipulacje MCU PIC18F4520 i skopiowania wbudowanego oprogramowania w formacie binarnym lub szesnastkowym;

The peripherals a partial image leaves undefined

The PIC18F4520 13 channel ADC and timers state is where an incomplete image does damage rather than stalling. The converter is 13 channels wide, so the firmware that selects a channel, sets the reference and scales the result lies in the code region; losing it leaves the front end live with no scaling. The four timers carry the timing the board synchronises to, and missing initialisation leaves compare outputs active rather than neutral.

The parallel port adds a second failure class, because it can drive against an external device. PIC18F4520 Parallel Slave Port initialisation is recorded explicitly: the port direction, control lines and strobe state before any transfer are part of what the image must establish. The safe configuration holds the port as an input, since a peripheral that drives during recovery can corrupt the device at the far end.

Peripheral Function on the board Risk when the image stops short State the recovered image must establish
13-channel 10-bit ADC Analogue measurement for board sensors Channels left sampling with no scaling applied Channel selection and reference fixed before conversion
Four timers Rate generation and control loop timing Compare output stuck in its active state Every timer stopped or reconfigured from a defined state
Parallel Slave Port Parallel data exchange with an external controller Port driving against the external bus Direction and strobe lines held as inputs at reset
General digital I/O Board control lines and status indicators Latch holding the last value written before the gap Outputs driven to the documented safe level
يحتاج برنامج ذاكرة فلاش المعالج الدقيق PIC18F4520 واسترداد بيانات ذاكرة eeprom إلى فك حزمة السيليكون الخاصة بوحدة التحكم الدقيقة المقفلة PIC18F4520، وكسر نظام مقاومة العبث MCU PIC18F4520 ونسخ البرامج الثابتة المضمنة بتنسيق ثنائي أو سداسي؛

يحتاج برنامج ذاكرة فلاش المعالج الدقيق PIC18F4520 واسترداد بيانات ذاكرة eeprom إلى فك حزمة السيليكون الخاصة بوحدة التحكم الدقيقة المقفلة PIC18F4520، وكسر نظام مقاومة العبث MCU PIC18F4520 ونسخ البرامج الثابتة المضمنة بتنسيق ثنائي أو سداسي؛

Retrieve protected PIC18F4520 program memory data: assembling a safe handover

The recovery reads and reports each of the five blocks separately, so the useful result is an image plus a map of what it lacks. Every gap is identified by block and address and paired with the peripheral it affects, so a missing block 2 leaves the timer outputs undefined while block 3 only removes application code. Locked blocks are reported as locked rather than empty, and the boundary address is given so a locked region is not mistaken for absent silicon.

The deliverable has three parts: every readable block verbatim, the safe initialisation state from the table above so the board reaches a known condition before recovered code runs, and the configuration word decoded into CP, WRT, WRTC and EBTR values with the device ID at 0x3FFFFE-0x3FFFFF.

Because the CPU can always read its own program memory regardless of the protection bits, a bootloader inside a protected device can move code into RAM and out, so the boot block is worth recovering even without application logic. Comparable schemes elsewhere appear in attacking PIC16F630 firmware, attacking PIC18F26K22 flash memory, and attacking PIC18F26K80 protection, while ARM MCU chip extraction and AVR chip software extraction cover the wider toolchain.

To retrieve protected PIC18F4520 program memory data is to return the readable blocks, name every gap against the peripheral it affects, and hand over the configuration that brings the board to a safe state before the image runs, and the work is handled by our lab.

PostHeaderIcon Copy Locked PIC18F2480 Heximal

A copy of a sealed PIC18F2480 is only useful if the replacement behaves like the original on the bus it drives. The part carries an ECAN controller, 16 KB of program memory, 768 bytes of RAM, a 256-byte data EEPROM, an 8-channel 10-bit ADC and up to 40 MHz in a 28-pin package, with no USB port. Nothing about this device is visible on a universal serial bus, so the only external evidence it leaves is CAN traffic. Copy locked PIC18F2480 heximal therefore means reconstructing a node identity as well as an image.

copy PIC18F2480 Microchip MCU locked heximal out from secured microcontroller PIC18F2480 flash program memory and eeprom data memory needs to unlock protective PIC18F2480 microprocessor's fuse bit, read embedded firmware out of binary file or heximal source code;

copy PIC18F2480 Microchip MCU locked heximal out from secured microcontroller PIC18F2480 flash program memory and eeprom data memory needs to unlock protective PIC18F2480 microprocessor’s fuse bit, read embedded firmware out of binary file or heximal source code;

Copy locked PIC18F2480 heximal: what has to match

Three things have to match: the 16 KB flash image, the configuration word, and the runtime state the firmware writes into peripheral registers at startup. The image carries the code that sets the acceptance filters, the masks and the bit timing of the ECAN module, and those settings never appear in the flash array as data; they are instructions. The configuration word carries the oscillator selection from which the peripheral clock and therefore the CAN bit timing derive, plus the CP bits that describe what may be read. Get the code right and the configuration word wrong, and the copy transmits at the wrong bit rate and vanishes from the network.

Reading the configuration word under an active CP

PIC18F2480 CP bit on 16 KB array follows the standard geometry: a 2 KB boot block at 0x000000-0x0007FF under CPB, then Block 0 at 0x000800-0x001FFF and Block 1 at 0x002000-0x003FFF under CP0 and CP1, with the 16 KB parts implementing those two blocks only. Programming mode entry needs a reset, and with LVP set in CONFIG1H the PGM line activates without a high-voltage pulse on MCLR/VPP. The configuration registers at 0x300000 can be read while the code blocks remain sealed, so the protection state is known before any destructive step is considered. If MCLRE is 0 the MCLR pin is general purpose I/O and the reset must come from elsewhere on the board.

copiar PIC18F2480 Microchip MCU bloqueado heximal de la memoria de programa flash PIC18F2480 del microcontrolador protegido y la memoria de datos EEPROM necesita desbloquear el bit fusible del microprocesador PIC18F2480 protector, leer el firmware incorporado del archivo binario o código fuente heximal;

copiar PIC18F2480 Microchip MCU bloqueado heximal de la memoria de programa flash PIC18F2480 del microcontrolador protegido y la memoria de datos EEPROM necesita desbloquear el bit fusible del microprocesador PIC18F2480 protector, leer el firmware incorporado del archivo binario o código fuente heximal;

The ECAN identity problem

PIC18F2480 ECAN configuration recovery is the part of the job that a flash dump alone cannot settle. The ECAN module holds filter and mask registers plus buffer configuration, and the identifiers the node answers to are written into those registers by firmware during startup. PIC18F2480 node identity after readout is therefore reconstructed by reading the initialization code out of the image and following it into the module. Copy a unit into a live plant and leave those identifiers unchanged, and two nodes answer the same request identifiers on the same segment, a fault that is visible outside the unit under test.

Copy PIC18F2480 MCU Locked Heximal

Copy PIC18F2480 MCU Locked Heximal

Setting Where it lives Effect if it is wrong Recovery source
Node identifiers firmware initialization code two nodes answer the same identifiers recovered flash image
Acceptance filters and masks ECAN module registers written at startup the node accepts or rejects the wrong traffic filter and mask restore from the initialization sequence
Bit timing oscillator configuration in the configuration word the node transmits off-rate and drops off the bus configuration word transferred with the image
Buffer configuration firmware initialization code frames are dropped under bus load recovered flash image
ADC channel mapping firmware plausible but wrong measurements recovered flash image
Calibration data 256-byte data EEPROM under CPD offsets are lost after an erase EEPROM readout before any erase

Restoring filters, masks and timing

PIC18F2480 CAN filter and mask register restore is performed from the recovered initialization sequence rather than by guessing at the bench. The filter values, mask settings, buffer configuration and timing divisor are written by the startup code the image supplies, and re-executing that sequence on the target restores them exactly. Bit timing depends additionally on the oscillator configuration stored in the configuration word, so that word has to travel with the image instead of being left at the erased default. The 256-byte data EEPROM carries its own CPD protection, separate from the flash, so calibration data held there must be read before any erase is performed.

скопируйте заблокированный шестнадцатеричный код микроконтроллера PIC18F2480 из защищенного микроконтроллера. Необходимо разблокировать защитный бит предохранителя микропроцессора PIC18F2480 во флэш-памяти программ и памяти данных EEPROM, считать встроенную прошивку из двоичного файла или шестнадцатеричного исходного кода;

скопируйте заблокированный шестнадцатеричный код микроконтроллера PIC18F2480 из защищенного микроконтроллера. Необходимо разблокировать защитный бит предохранителя микропроцессора PIC18F2480 во флэш-памяти программ и памяти данных EEPROM, считать встроенную прошивку из двоичного файла или шестнадцатеричного исходного кода;

Verifying the copy

Verification rests on a read-back plus checksum, where the checksum is the sum of code memory contents, the masked configuration word and the ID locations reduced to the low 16 bits. The device ID and revision come from 0x3FFFFE-0x3FFFFF and the user-programmable ID bytes from 0x200000-0x200007; both are always readable and both should travel with the copy. The 8-channel 10-bit converter is mapped to the plant analog inputs by firmware, so a copy with the wrong channel map reports plausible but wrong measurements. Comparable work on neighbouring devices is documented in the PIC18F4220 binary recovery, PIC18F2423 protected memory and PIC18F2610 MCU flash readout notes.

PIC18F2480 마이크로칩 MCU를 보안 마이크로컨트롤러 PIC18F2480 플래시 프로그램 메모리와 EEPROM 데이터 메모리에서 잠긴 16진수를 복사하여 보호 PIC18F2480 마이크로프로세서의 퓨즈 비트를 잠금 해제하고, 이진 파일이나 16진수 소스 코드에서 임베디드 펌웨어를 읽어야 합니다.

PIC18F2480 마이크로칩 MCU를 보안 마이크로컨트롤러 PIC18F2480 플래시 프로그램 메모리와 EEPROM 데이터 메모리에서 잠긴 16진수를 복사하여 보호 PIC18F2480 마이크로프로세서의 퓨즈 비트를 잠금 해제하고, 이진 파일이나 16진수 소스 코드에서 임베디드 펌웨어를 읽어야 합니다.

Copy locked PIC18F2480 heximal is therefore a four-artifact job: the code, the configuration word, the EEPROM and the bus identity, checked against a silicon checksum and against the original on the wire. The ARM MCU firmware read and ARM chip embedded firmware read procedures apply the same discipline to other architectures, and the rebuild of that verified set for a locked PIC18F2480 is handled by our lab.

PostHeaderIcon Break Locked PIC18F2450 Heximal

When a PIC18F2450 comes back from the field with its flash sealed, the first measurement worth taking is of the configuration word at 0x300000, not of the code array, because every read-protection decision on this silicon is recorded there. The part holds 16 KB of program memory, 768 bytes of RAM, no data EEPROM and a full-speed USB controller in a 28-pin package, and that controller reshapes the attack surface: a device that enumerates can be interrogated without a programmer on the ICSP pins. To break locked PIC18F2450 heximal, the technician weighs two routes rather than one.

break PIC18F2450 microcontroller locked heximal is a process start from decrypt secured microprocessor PIC18F2450 fuse bit to recover binary data or heximal file from MICROCHIP PIC18F2450 protective MCU flash program memory and eeprom code memory;

break PIC18F2450 microcontroller locked heximal is a process start from decrypt secured microprocessor PIC18F2450 fuse bit to recover binary data or heximal file from MICROCHIP PIC18F2450 protective MCU flash program memory and eeprom code memory;

The configuration word is the first readable artefact

Entering programming mode requires the device to be reset, and with LVP set in CONFIG1H the PGM line activates without a high-voltage pulse on MCLR/VPP, so a low-voltage programmer can drive the part. In that mode the configuration registers at 0x300000 can be read even when the code blocks are sealed. CONFIG5L carries CP3 through CP0 and CONFIG5H carries CPD and CPB, and a protection bit reads 1 when unprotected and 0 when protected, so a zero marks a locked region. With no data EEPROM on the die, CPD has no object to guard and the question narrows to CP0, CP1 and CPB.

شکستن هگزیمال قفل شده میکروکنترلر PIC18F2450 فرآیندی است که از رمزگشایی ریزپردازنده ایمن بیت فیوز PIC18F2450 برای بازیابی اطلاعات باینری یا فایل هگزیمال از حافظه برنامه فلش محافظ MCU MICROCHIP PIC18F2450 و حافظه کد eeprom شروع می شود.

شکستن هگزیمال قفل شده میکروکنترلر PIC18F2450 فرآیندی است که از رمزگشایی ریزپردازنده ایمن بیت فیوز PIC18F2450 برای بازیابی اطلاعات باینری یا فایل هگزیمال از حافظه برنامه فلش محافظ MCU MICROCHIP PIC18F2450 و حافظه کد eeprom شروع می شود.

Break locked PIC18F2450 heximal: two routes into the part

The programming interface is one route and the USB port is the other, and the second changes what the recovery is worth. Because the CPU can always read its own program memory regardless of the CP bits while an external tool cannot, a bootloader accepting commands over the bus becomes an alternate readout, and a working PIC18F2450 USB bootloader read command would hand over exactly the bytes the CP bits deny to a programmer. The PIC18F2450 ICSP versus USB access route is settled by what the device does on the bus after reset.

Reading the CP bits block by block

PIC18F2450 CP protection of 16 KB array follows the block geometry this family shares: a 2 KB boot block at 0x000000-0x0007FF held by CPB, then Block 0 at 0x000800-0x001FFF and Block 1 at 0x002000-0x003FFF under CP0 and CP1. The 16 KB variants implement those two blocks only, so CP2 and CP3 describe regions not present on this silicon and the upper addresses return 0x00 whatever the configuration word claims. Older parts laid their blocks out differently, as PIC16F716 hex image recovery shows.

Break PIC18F2450 Microcontroller Locked Heximal

Break PIC18F2450 Microcontroller Locked Heximal

Region Address range Size Protection bit External read result
Boot block 0x000000-0x0007FF 2 KB CPB 0x00 when CPB reads 0
Block 0 0x000800-0x001FFF 6 KB CP0 0x00 when CP0 reads 0
Block 1 0x002000-0x003FFF 8 KB CP1 0x00 when CP1 reads 0
Block 2 and Block 3 0x004000-0x007FFF absent CP2 and CP3 0x00, no silicon present
Data EEPROM not present none CPD no object to guard
Device ID and revision 0x3FFFFE-0x3FFFFF 2 words none always readable
User ID bytes 0x200000-0x200007 8 bytes none always readable

What enumeration proves

PIC18F2450 USB enumeration as recovery signal is worth more than a pass or fail result, because the descriptors the device returns are authored by the firmware. Vendor and product identifiers, string descriptors and any version string come out of flash, so a coherent enumeration is evidence that legitimate code is running and not a blank device. It also reveals whether a bootloader is resident, which decides if the bus route deserves hours of work. Older parts differ, as PIC12C509 code protection recovery shows.

PIC18F2450 माइक्रोकंट्रोलर लॉक हेक्सिमल को तोड़ना एक प्रक्रिया है जो डिक्रिप्ट सुरक्षित माइक्रोप्रोसेसर PIC18F2450 फ्यूज बिट से शुरू होती है, जो माइक्रोचिप PIC18F2450 सुरक्षात्मक MCU फ्लैश प्रोग्राम मेमोरी और ईप्रोम कोड मेमोरी से बाइनरी डेटा या हेक्सिमल फ़ाइल को पुनर्प्राप्त करती है;

PIC18F2450 माइक्रोकंट्रोलर लॉक हेक्सिमल को तोड़ना एक प्रक्रिया है जो डिक्रिप्ट सुरक्षित माइक्रोप्रोसेसर PIC18F2450 फ्यूज बिट से शुरू होती है, जो माइक्रोचिप PIC18F2450 सुरक्षात्मक MCU फ्लैश प्रोग्राम मेमोरी और ईप्रोम कोड मेमोरी से बाइनरी डेटा या हेक्सिमल फ़ाइल को पुनर्प्राप्त करती है;

Erasing the seal is a decision, not a step

The only documented way to clear read protection is a full chip erase performed by a programmer, and there is no bit-by-bit unprotect. A chip erase destroys program memory and the EEPROM contents, so on a sealed part it ends the investigation rather than beginning it. If the flash is not protected, the tool reads it directly. If it is protected and no bus route exists, the erase is all that remains. MCLR must be usable for the reset that starts programming mode; with MCLRE at 0 the pin is general purpose I/O and the reset must come from elsewhere. A separate EEPROM lock behaves differently, as PIC16F59 EEPROM read recovery shows.

What the deliverable must contain

A completed job produces the 16 KB flash image, the configuration word with its protection state documented, the device ID and revision from 0x3FFFFE-0x3FFFFF, and the user-programmable ID bytes at 0x200000-0x200007. Verification is a read-back plus checksum, the sum of code memory contents, the masked configuration word and the ID locations reduced to the low 16 bits. The same discipline appears in the ARM MCU firmware extraction and AVR chip software extraction notes.

Взлом заблокированного шестнадцатеричного кода микроконтроллера PIC18F2450 — это процесс, начинающийся с расшифровки защищенного бита предохранителя микропроцессора PIC18F2450 для восстановления двоичных данных или шестнадцатеричного файла из программной флэш-памяти защитного микроконтроллера MICROCHIP PIC18F2450 и памяти кодов EEPROM;

Взлом заблокированного шестнадцатеричного кода микроконтроллера PIC18F2450 — это процесс, начинающийся с расшифровки защищенного бита предохранителя микропроцессора PIC18F2450 для восстановления двоичных данных или шестнадцатеричного файла из программной флэш-памяти защитного микроконтроллера MICROCHIP PIC18F2450 и памяти кодов EEPROM;

To break locked PIC18F2450 heximal, read the configuration word first, test the bus route while the seal is intact, and accept an erase only when nothing else is left. An image with the wrong protection state or clock configuration does not behave like the original, so the image, the configuration word and the identity bytes must arrive as one set, and that work is handled by our lab.

PostHeaderIcon Break MCU ATxmega64A1 Heximal: The Boot Section Has Its Own Lock Bits

Most descriptions of device protection treat the flash as a single object with a single lock. On an AVR XMEGA that model is wrong in a way that changes the engagement. The array is divided into an application section and a boot section, each with its own pair of lock bits, and the interesting cases are the ones where the two halves disagree.

The ATxmega64A1 is the mid-sized member of the family: 65536 bytes of flash, 4 KB of SRAM, 2 KB of EEPROM in its own address space, 78 I/O pins in a hundred-pin body, and the same generous peripheral set as its larger sibling — eight USARTs, twelve-bit converters, an AES engine, a DMA controller and the event system. It is the part chosen by designs that need the peripherals but not the memory, which in practice means instrumentation and industrial communication gateways.

The part in numbers

item ATxmega64A1
program memory 65536 bytes, 32768 words
boot section a reserved region at the top, size set by fuse
SRAM 4 KB
EEPROM 2 KB, separate address space
I/O 78 pins, 100-pin body
programming PDI, three pins
lock bits one for the whole device, plus boot lock pairs
erase unit chip erase, or application section erase

The boot section size is a fuse setting rather than a fixed number, which matters because a customer’s memory map depends on how the production line set that fuse. A bootloader written for a 4 KB section will not start correctly on a part whose fuse reserves 8 KB.

Two lock pairs and one device lock

bit pair protects what it stops what it does not stop
boot lock, application side the application section writes and reads from the boot code reads from the PDI
boot lock, boot side the boot section writes from the application code reads from the application code
device lock everything, from outside the PDI interface entirely code already running on the part

The third row is the one that surprises people, and it is the single most useful fact on this page. The device lock is an interface lock. It disables the external programming and debug interface. It does not disable the core, it does not disable LPM, and it does not disable a routine that has already been written into the part.

So a locked device is locked against a programmer, not against itself.

What that means in practice

If the design shipped with a bootloader that accepts commands over a serial port, the bootloader is code running on the part with the ability to read flash. Whether it can be made to hand that flash out depends on the protocol and on whether the boot lock pair permits the boot section to read the application section.

Many factory bootloaders have a read command for firmware update verification. Some have a full memory-read command used in production test and never removed. Finding one is a matter of reading the bootloader’s own code, which is itself recoverable if the boot section is not locked against the programmer — and on a device that is locked, the boot section may still be readable through the same route that made the bootloader interesting in the first place.

The honest summary: when a bootloader is present, the recovery may not need a probe at all. When it is absent, or when both boot lock pairs are set to forbid the reads, the route closes and the die becomes the only path.

Why the boundary is worth checking first

Before any of this, three reads cost almost nothing and decide the shape of the job.

Read the device signature. It names the part exactly, which distinguishes the A1 from its siblings that share the package, and therefore tells you the memory map you are working against.

Read the fuse bytes. The boot section size, the reset vector source, the brown-out level and the watchdog configuration all live there, and they describe how the design was built rather than what it computes. A design that resets into a bootloader and a design that resets into the application are different products with different failure modes.

Read the boot section’s first words. If the boot reset vector decodes to a jump into plausible code, there is a bootloader and the route described above is worth exploring. If it reads as erased, the design never used one and the fuse that reserves the space is simply wasted.

What a 64 KB image looks like when it comes back

Sixty-four kilobytes is 32768 instruction words, comfortably inside a sixteen-bit word address, so the pointer arithmetic problems that plague the 128 KB sibling do not arise here. What remains is the byte-versus-word distinction: the hex file is byte addressed, the jump mechanisms are word addressed, and a computed jump built from a table entry needs a shift before it will land correctly.

The boot boundary is the second hazard. A disassembly that sweeps linearly from zero through the whole file will run straight through the application section into the boot section and continue as if it were one program. It is not. The boot section is entered by a reset vector at a fuse-determined offset, and analysing it requires starting there rather than arriving by fall-through.

The third hazard is the EEPROM. Two kilobytes in a separate address space, read by a different command, and often holding exactly the values a customer asked for when they said “the data”. Delivering the flash alone and calling the job complete is a common and avoidable mistake.

For the larger sibling where the address arithmetic rather than the boot section is the difficulty, ATxmega128A1 heximal reversal covers that ground. For the eight-bit megaAVR part with an external bus, ATmega162A heximal recovery is the nearest comparison. And for a PIC part where the protection is a single fuse and no software can reach around it, PIC16C56 code copying shows the other extreme.

FAQ

Does a chip erase remove the bootloader? Yes, along with the application, the EEPROM and the lock bits. On a part where the bootloader was the route to the image, erasing is the end of the recovery rather than the beginning.

Can the boot section be read by the application? Only if the boot lock pair permits it. That pair exists precisely to let a design hide a bootloader from the application code it is loading.

Is PDI the only external interface? On this family, yes, and it is the one the device lock disables. There is no second path through a debug protocol.

The short version

Two sections, two lock pairs, one device lock, and a lock that blocks the programmer rather than the code. Read the signature, the fuses and the boot vector before deciding anything, treat the boot section as a separate program with its own entry point, and do not forget the EEPROM in its own address space. When a bootloader is present the job may be a conversation over a serial port; when it is not, it is a die and a probe.

PostHeaderIcon ATmega16PA: Where the picoPower Revision Changes the Read

A suffix on an AVR part number is not decoration. It encodes which die is inside the package, and the die determines what the programming interface will and will not do. The PA suffix points at a picoPower revision: the same AVR8 core, the same instruction set, the same pinout, but a different physical implementation with different electrical behaviour.

Most of the time that difference is invisible. It becomes visible at exactly the wrong moment — when the supply is marginal, when the programmer is fast, or when something in the toolchain assumes a device signature it has seen before.

What picoPower actually changed

The picoPower programme was not a marketing rename. It changed several blocks inside the die:

  • The internal RC oscillator was redesigned for lower current and better stability across temperature.
  • The brown-out detector gained more levels and a lower minimum threshold.
  • The watchdog oscillator was separated further from the main clock.
  • Sleep current dropped by roughly an order of magnitude in the deepest modes.

None of those changes touch the programming algorithm. What they touch is timing and threshold behaviour, and both of those are inputs to a successful read.

The signature is the first thing to check

A programmer identifies the part by reading the device signature: three bytes, vendor, family, and model. The third byte is where revisions diverge. A revision that changed the die often carries a different third byte, and tools that hard-code a table will refuse to proceed when they see one they do not recognise.

The failure mode is annoying rather than fatal: the programmer reports “unknown device” and stops, while the chip is perfectly healthy and perfectly readable. Anyone working across a mixed stock of base parts and PA parts will hit this, and the fix is to stop trusting the tool’s device table and read the signature directly through the command interface.

Two further points about the signature area. It is readable even when the flash is locked, because a production tester needs to confirm identity. And on picoPower parts the signature row also carries the RC oscillator calibration byte, which is a separate item with its own importance.

Brown-out is a read problem, not a run problem

The brown-out detector exists to stop the core from executing below its rated voltage. At the bench, the relevant question is different: what is the lowest supply at which the programming interface will complete a page read without silently corrupting it.

picoPower parts are specified to run lower than their predecessors, and it is tempting to conclude that they can therefore be read lower. That conclusion is wrong in a specific way. The programming interface has its own minimum, and it is not the same number as the core’s minimum. Reading at the core’s minimum voltage produces data that looks plausible and fails a checksum, which is the worst possible failure mode: it wastes a full teardown cycle before anyone notices.

The discipline that avoids it is simple: read at the top of the range, not the bottom, and verify by reading the same page twice and comparing. A page that differs between two reads at the same voltage is a voltage problem, not a memory problem.

Timing margins move with the die

ISP is a synchronous serial protocol: the programmer drives SCK, the target samples on one edge and shifts on the other. The maximum SCK frequency depends on the target’s clock, and on a part running from its internal RC at a low frequency the ceiling is much lower than the datasheet’s headline number suggests.

Because the picoPower RC oscillator starts faster and is more stable, a PA part often tolerates a faster SCK than the base part at the same nominal setting. That sounds like good news and is a trap in the other direction: a programmer tuned for the slower base part will work, and a programmer tuned aggressively for the PA part will fail intermittently on the base part in the same tray. If a batch mixes both, run the slow setting and accept the time cost.

The fuse layout is unchanged, and that is the useful part

Because picoPower did not redesign the fuse map, everything the fuse byte tells you about protection still applies without translation:

Fuse Effect on a read attempt
SPIEN If unprogrammed, serial ISP is disabled; the part must be entered in parallel mode
RSTDISBL If programmed, the reset pin is no longer a reset pin, so ISP entry is impossible
DWEN If enabled, the debug interface owns the reset pin and locks out ISP
EESAVE If programmed, the EEPROM survives a chip erase
CKSEL / SUT Determines start-up clock and delay; affects how fast the interface answers after reset

The value of this table is diagnostic. Before attempting anything, read the fuse bytes. If SPIEN is off or RSTDISBL is on, the part will not answer ISP no matter how the programmer is configured, and no amount of retrying will change that. The only entry left is the parallel interface, which needs twelve volts on the reset pin and a different adapter entirely.

Why the flash still ends up unreadable

None of the above changes the fundamental constraint. The lock bits are enforced by the programming interface, and the only way to clear them is a chip erase, which erases the flash in the same operation. A picoPower revision does not alter that in either direction.

So the sequence on a PA part is the same as on any other megaAVR: identify the die by signature, read the fuse bytes to learn which interfaces are still open, read the lock byte to learn which command groups are permitted, and only then decide whether a read is possible at all. Three reads, none of them touching the flash, and they answer the question that matters before any invasive work begins.

Related notes

FAQ

Is an ATmega16PA instruction-compatible with an ATmega16? Yes. picoPower changed the physical implementation, not the instruction set or the register model. Code assembled for the base part runs unchanged.

Can the signature difference be worked around in the programmer? Yes, by reading the signature through raw commands instead of relying on the tool’s device table. The chip answers; the tool is what refuses.

Does a PA part need a different socket? No. Pinout is unchanged, so the same adapter fits. What changes is the electrical margin, not the mechanical one.

Does picoPower make the part easier to read? It makes the electrical margin wider at low voltage, which helps reliability. It does not change the lock bit mechanism at all.

Conclusion

The PA suffix is a die identifier, and on the bench it shows up in three places: the signature byte, the brown-out threshold, and the RC oscillator’s timing. All three are inputs to a read attempt, and none of them is a protection mechanism. Treat them as calibration issues — measured, not assumed — and the picoPower revision stops being a surprise.

PostHeaderIcon STM32H723: 550 MHz Is a Mode, Not a Property

A datasheet headline of 550 MHz reads like a property of the part, in the same way that 1 MB of flash is a property of the part. It is not. The top frequency on this device is reachable only in a particular voltage scaling setting, that setting is bounded by the supply configuration and the temperature range, and the firmware has to ask for it explicitly during start-up. An image pulled from one board and restored onto another can therefore be complete, correct, and unable to run at the speed it was written for.

Two clock figures for one device

The same part is specified at two maximum frequencies depending on which voltage scaling mode the application selects. The lower figure is the one that holds across the whole operating envelope; the higher figure applies in the overdrive mode, which carries conditions.

figure mode conditions
400 MHz standard voltage scaling full temperature range, full supply range
550 MHz overdrive (highest voltage scaling) restricted temperature range, particular supply configuration

Neither number is wrong. They answer different questions. A recovery report that states only “550 MHz” has answered the marketing question and left the engineering one open, which is whether the image will run at that speed on the board it is going back onto.

What the firmware has to do to get there

Reaching the top frequency is a sequence, not a register write. The core cannot be clocked faster than the voltage scaling setting allows, and the setting cannot be raised until the regulator is ready, so the start-up code walks up through the modes in order, waiting on a status flag between steps.

step what changes how the code waits
run at the safe frequency core clock from the internal oscillator nothing to wait for
raise voltage scaling regulator target moves up one step poll the ready flag
reconfigure the PLL multiplier and divider for the target frequency poll the lock flag
switch the system clock core moves from oscillator to PLL output poll the switch status
set flash wait states latency matching the new frequency none, but order matters

That sequence is unusually legible in a disassembly. The register writes are to fixed peripheral addresses, the polling loops are short and repeated, and the PLL parameters are constants. Which is why the sequence is one of the most reliable identity signals in the whole image: it tells you the frequency the build was designed for, and it tells you the voltage mode the design assumed.

Flash latency as a cross-check

The wait-state setting is the cheapest independent confirmation. It has to match the clock frequency, and it is derived from it by a formula in the reference manual rather than chosen freely.

observed latency consistent with inconsistent with
set for the safe frequency, never raised a build that never uses overdrive a design that claims 550 MHz
set for the top frequency a build targeting overdrive operation below the standard maximum
changed more than once at start-up a design that ramps a fixed-frequency design

Where the latency value and the PLL settings disagree, one of two things has happened: the image was built for a different silicon revision with a different formula, or the image has been assembled from parts of more than one build. Both are worth stating in a report, because both change what the customer should expect on first power-up.

Why this matters more here than on a slower part

On a part with a single maximum frequency, “the clock is wrong” shows up as an obviously wrong clock. Here it shows up as something subtler, because the part will run at the reduced speed and mostly work.

symptom on the destination board the actual cause
application runs but misses deadlines it used to meet built for overdrive, running in standard mode
intermittent faults only when warm overdrive requested outside its temperature range
start-up hangs before any application code PLL parameters assume a supply configuration the board does not have
runs correctly but the debug port is dead start-up options programmed for the overdrive configuration

The first row is the one that reaches a bench as a mystery. Nothing is broken, no bit is wrong, and the device is simply slower than the firmware assumes. On a motor control loop or an audio path that is a functional failure; on a logging application it may go unnoticed for months.

The supply configuration is part of the answer

This line of the family is fed through a linear regulator only, with the regulator output brought out for decoupling. Sibling parts in the same family add a switched-mode regulator alongside it, which changes the external component count and the start-up timing. A board built for one is not a board built for the other, and the firmware’s voltage-scaling sequence encodes which one it expects.

That is why the question “will this image run on my board” cannot be answered from the image alone. It can be answered jointly from the image and the board: the image states the mode it wants, the board states the mode it can supply.

What the delivered image contains

The return set is the full flash contents, the option bytes decoded, a disassembly with the clock initialisation identified and annotated, and a statement of the voltage mode and frequency the build targets.

The annotation is the part that earns its place. A customer receiving a hex file with no commentary has to rediscover the clock tree themselves; a customer receiving the same file with the PLL constants, the latency value and the voltage mode named has been told what the image expects of its host.

A related reading of the same silicon generation, from the angle of the external memory interface rather than the clock tree, is at STM32H725 heximal recovery. The dual-bank flash arrangement that determines where in the array this image actually sits is covered in STM32H743 flash recovery. For the same class of protection failure on a smaller member of the STM32 family, STM32F358VC flash breaking covers the read-out restrictions.

FAQ

Is the higher frequency available at every temperature? No. The overdrive mode carries a narrower temperature range than the standard mode, and the datasheet states it.

Can the part be run at the top frequency without the voltage step? No. The core clock is bounded by the voltage scaling setting, so the sequence has to be followed.

Does the image say which mode it uses? Yes, through the PLL parameters, the flash latency value and the order of the voltage-scaling writes.

Conclusion

The headline frequency belongs to a mode, and the mode belongs to a supply and a temperature range. Reading the clock initialisation out of an image recovers which mode the build assumed; comparing that against the destination board answers the question the customer actually has, which is not how fast the part can go but whether this image can go that fast where it is going.

PostHeaderIcon Break Microcontroller PIC12C672 Heximal

The PIC12C67X devices are low-cost, high-performance, CMOS, fully-static, 8-bit microcontrollers with integrated analog-to-digital (A/D) converter and EEPROM data memory (EEPROM on PIC12CE67X versions only) when Break Microcontroller PIC12C672 Heximal.

All PICmicro® microcontrollers employ an advanced RISC architecture. The PIC12C67X microcontrollers have enhanced core features, eight-level deep stack, and multiple internal and external interrupt sources. The separate instruction and data buses of the Harvard architecture allow a 14-bit wide instruction word with the separate 8-bit wide data after IC Cloning. The two stage instruction pipeline allows all instructions to execute in a single cycle, except for program branches, which require two cycles.

Break Microcontroller PIC12C672 Heximal

Break Microcontroller PIC12C672 Heximal

A total of 35 instructions (reduced instruction set) are available. Additionally, a large register set gives some of the architectural innovations used to achieve a very high performance. PIC12C67X microcontrollers typically achieve a 2:1 code compression and a 4:1 speed improvement over other 8-bit microcontrollers in their class.

The PIC12C67X devices have 128 bytes of RAM, 16 bytes of EEPROM data memory (PIC12CE67X only), 5 I/O pins and 1 input pin. In addition a timer/counter is available. Also a 4-channel, high-speed, 8-bit A/D is provided. The 8-bit resolution is ideally suited for applications requiring low-cost analog interface which can be used for MC68HC05B6 microcontroller ic extract code, (i.e., thermostat control, pressure sensing, etc.) before Break MICROCONTROLLER

The PIC12C67X devices have special features to reduce external components, thus reducing cost, The PIC12C67X products are compatible with other members of the 14-bit PIC16CXXX families. enhancing system reliability and reducing power consumption.

The Power-On Reset (POR), Power-up Timer (PWRT), and Oscillator Start-up Timer (OST) eliminate the need for external reset circuitry. There are five oscillator configurations to choose from, including INTRC precision internal oscillator mode and the power-saving LP (Low Power) oscillator mode when Extract PIC16F84 MCU firmware. Power-saving SLEEP mode, Watchdog Timer and code protection features improve system cost, power and reliability.

The SLEEP (power-down) feature provides a power-saving mode. The user can wake-up the chip from SLEEP through several external and internal interrupts and resets when Break Microcontroller PIC12C672 Heximal.

PostHeaderIcon Break MCU PIC16F527 Heximal: A Memory Size That Is Not a Power of Two

Almost every program memory in this class is a power of two: 512, 1024, 2048, 4096. Engineers size buffers accordingly, tools round up, and a read that returns exactly 1024 words confirms itself. Then a part like the PIC16F527 arrives with fifteen hundred and thirty-six words, and every one of those assumptions becomes a source of error.

An eight-pin device with that much program space and a small analogue front end is an odd combination, and it exists for a reason: it is what you use when the code does not fit in a kilobyte but the board has no room for a bigger package. The awkward size is the point.

Where the number comes from

Boundary Address Note
start of program 0x000 reset vector
end of code region 0x5FF last implemented word of the array
configuration area above the array layout varies by family member
unimplemented range above the array reads as a fixed value, not as blank

Fifteen hundred and thirty-six words spans 0x000 to 0x5FF. It is three pages of five hundred and twelve, which is the reason for the number: the array is built from complete pages, and the family chose three rather than four to keep the die small.

That has a direct consequence for the image: the third page is partially used, and the boundary between the last page and the configuration area is not a round address. A read of exactly 0x600 words includes the configuration word; a read of 0x5FF excludes it; a read of 0x800 includes six hundred and forty words of unimplemented space that a tool may fill with a default value.

What tools do with a default length

Three behaviours, all of which produce a file that looks right.

A tool that reads a power-of-two length reads 2048 words and appends five hundred and twelve words of whatever the unimplemented space returns. If that value is all ones, the file looks like a program with a long blank tail and nobody notices. If it is a pattern, the file contains a region that is neither code nor blank, and a later reader will try to interpret it.

A tool that reads exactly the requested length truncates or extends by a few words, and the configuration word ends up in the wrong place — usually included when it should not be, or omitted when it should be.

A tool that reads until the last non-blank word returns a file that ends at the last instruction, which on this part is a perfectly valid file and an incomplete image: the blank tail is information, because it says where the linker stopped.

Why the boundary has to be established, not assumed

On a power-of-two part the boundary is implied by the size. Here it has to be determined, and there are two ways.

The first is to read the full implemented range and then read beyond it. The values above the array are fixed and characteristic — they do not vary between addresses the way code does, and they do not look like all ones at every address. Comparing the two regions establishes the boundary empirically.

The second is to consult the device identification the programming interface returns, which states the array size. That is faster and requires the interface to answer, which on a device with a marginal connection it may not.

Both are worth doing on a first unit of a design, because the answer is then known for every subsequent unit of the same type.

Reading the program when the array is an odd length

The analysis is unaffected: fifteen hundred words of code is fifteen hundred words, and the reading techniques that apply to any part of this core apply here. What changes is the arithmetic around the analysis.

A table at the top of the third page has a base address that is not a round number, and any calculation of the table offset has to use the real base rather than a rounded one. A cross-page jump into the third page has a target that is not aligned to anything, which makes the disassembly of that region harder to check by inspection.

The practical mitigation is to work from the address rather than from an index, and to print the page and offset alongside every label.

The analogue front end on an eight-pin part

The reason this part exists is that it combines a small package with more code space than the eight-pin baseline and a modest analogue capability. On the bench, that means two things.

The pins are shared: an analogue input is also a digital I/O, and the configuration of which is which is written at initialisation. Reading that write tells you how many sensor inputs the product has, which is usually one or two, because eight pins does not allow more.

And the conversion is referenced to the supply on most designs of this class, which makes the product’s accuracy dependent on the regulator. A recovered image whose thresholds are expressed in raw counts can be converted into voltages only if the reference assumption is known, and the reference is set in a register, so it is readable.

Delivering a file whose length is a statement

Item Content Why it matters here
array image 0x000 to 0x5FF the implemented range, exactly
boundary note how the boundary was established prevents a later default-length read
configuration decoded fields a value that does not sit at a round address
blank map ranges that are erased distinguishes blank from unimplemented

The second item is specific to this part and worth the sentence it costs: a colleague who re-reads the same design in a year will otherwise use a tool default and end up with a file that is six hundred words too long.

Where the memory size is small enough that the tail is the configuration word itself, PIC12F508 code recovery covers that boundary. Where an oversized array on a bigger package shows how the extra space is actually used, PIC16C662 heximal reads the port structure. And where the small array forces the code into visible shapes, PIC16F610 binary covers the fingerprints.

The short version

Three pages, not four. Establish the boundary by reading past it, state the implemented range in the delivery, and never let a tool’s default length decide what the image contains.

PostHeaderIcon Break IC PIC16C771 Firmware: Read Inhibition Is Not Code Protection

Two devices can both be described as “protected”, carry the same part-number prefix, come from the same family, and respond to a read attempt in completely different ways, because the mechanism that stops the read is not the same mechanism in both. On this generation of OTP parts it is read inhibition in the array and its decode logic; on flash parts it is a configuration bit that gates the interface. The distinction is not academic: it decides what a failed read looks like, and therefore what the next step should be.

The PIC16C771 is a twenty-pin part with 4096 by 14 bits of program memory, 256 bytes of RAM, 256 bytes of data EEPROM, a twelve-bit converter with a dozen channels, and two comparators. The twelve-bit converter is why the part exists: very few microcontrollers of its generation offered more than ten bits on chip, and the devices built around it are instruments rather than controllers — scales, pressure transmitters, thermocouple front ends.

The same word, two mechanisms

Aspect flash protection OTP read inhibition
what is set a configuration bit, rewritable a permanent condition in the array or its decode
how it acts gates the programming interface prevents the array from presenting content
reversibility can be cleared on an erased part no clear path
failure signature of a read uniform pattern or bus error patterned or attenuated content
where the work moves sometimes none needed always to the die

The fourth row is the useful one in practice. A flash part that refuses to read usually returns a well-defined refusal: a known pattern, a status flag, an error. An OTP part with read inhibition may return something that looks like content — a stable repeating value, or a set of words that decodes into instructions that do nothing useful. That appearance of content is what makes the diagnosis hard, because it invites analysis rather than suspicion.

Why “protected” reads sometimes look plausible

The inhibition acts on the sense path rather than on the address decode, so the array still sequences through addresses and the interface still returns values. What comes back is not the stored content but a fixed or attenuated response determined by the inhibit circuit.

Two signatures distinguish it. The values are identical across a long run of addresses that should contain varied code, and they are identical across different units of the same design. Real content differs between addresses; inhibited content does not.

The check is cheap: read two addresses a few hundred words apart that both should hold code, and compare. If they match exactly and the match repeats across the array, the array is not being read.

The twelve-bit converter changes what a recovery is worth

On a general-purpose part, a recovered image is worth having because it is the product. Here the image is only half the product: the other half is the calibration that turns a converter count into a physical quantity.

That calibration lives in two places. The data EEPROM holds the unit-specific values written at end of line — offset, gain, sometimes a temperature compensation table. The program holds the design-wide constants: the reference voltage assumption, the linearisation curve, the scaling to engineering units.

A delivery that omits the EEPROM content therefore hands over a program that cannot measure anything correctly, even though it is complete as an instruction listing. On this part, the 256 bytes matter as much as the four thousand words.

What the data EEPROM contains on an instrument

Region Typical content Consequence if lost
first few bytes offset and gain corrections reading drifts by a fixed amount
middle linearisation segments or breakpoints non-linearity returns
later serial number, production date, model code unit cannot be identified
tail usage counters or a checksum self-test fails at start-up

The fourth row explains a specific failure that is often blamed on the recovery: a device restored with a blank EEPROM runs its start-up self-test, compares a checksum over the data area against a stored value, finds a mismatch, and halts or enters a safe mode. The program is correct and the device is behaving exactly as designed.

Protecting one array and not the other

Because the bits are separate, a part can be shipped with the program array inhibited and the data EEPROM open, or the reverse. Both combinations occur in production, and they correspond to different commercial intentions: the first protects the design, the second protects the unit’s calibration.

For a job, the second combination is the awkward one, because the design is available and the calibration is not — and the calibration is what the customer cannot reconstruct without the original instrument’s test fixture.

Delivering firmware rather than a dump

The word “firmware” in the request implies something programmable, not merely readable. Three additions turn an image into firmware.

The configuration word, decoded, so that a blank part can be set up identically. The data EEPROM content, with the unit-specific values identified where their role can be established from the code that reads them. And a note on any region of the program array that could not be read or that reads as blank, because on an OTP device a blank region can mean three different things and the customer needs to know which.

Where the same family’s job classification is the subject, PIC16C770 eeprom reading sets out read, break and rebuild as separate engagements. Where the constants that make the converter meaningful are the focus, PIC16C717 program reads them as a specification. And where a mask-programmed part has no array to inhibit at all, PIC16CR83 heximal explains the different physics.

The short version

Protection is a mechanism, not a property. On this part the mechanism inhibits the sense path, so a blocked read can look like content and must be detected by repetition rather than by error. Then remember that the instrument is the converter plus the calibration, and deliver both arrays.

PostHeaderIcon Read Chip PIC16C770 Eeprom: Reading, Breaking and Rebuilding Are Three Jobs

The request line says “read”. Two messages later it may say “break”, and by the time the unit arrives the requirement is often a third thing again: a design that can be maintained. These are not degrees of the same effort. They are three different jobs that happen to involve the same twenty-pin device, and conflating them produces quotes that are wrong in both directions.

The PIC16C770 is a twenty-pin OTP part with a two-kilobyte-word program array, a small data EEPROM, and the higher-resolution converter that distinguishes this branch of the family from the general-purpose parts around it. The converter is why the device appears in weighing equipment, pressure transmitters and thermocouple front ends — applications where the analogue path matters more than the instruction count.

Three jobs, defined by their starting condition

Job Starting condition Work Typical deliverable
read protection not engaged programming interface read image, config word, data area
break protection engaged, device intact physical access to the array same content, by a different route
rebuild image available, product undocumented analysis and annotation structure, constants, behaviour note

The distinction is not about difficulty. A read on an unprotected part is fifteen minutes of fixture work. A break on a protected part of the same model is a different engagement with a different risk profile, even though the output file looks identical. And a rebuild does not involve the device at all beyond the initial read — it is an analysis task whose input happens to be a hex file.

Why the customer’s words do not settle it

Three patterns account for most of the mislabelling.

A customer who owns the design says “break” because that is the vocabulary of the market, when what they need is a read of their own unprotected part. Charging for a break and delivering a read is a commercial error in the customer’s favour; the reverse is worse.

A customer who has lost the source says “read” when the part is protected, and the first read attempt comes back as a pattern. That pattern is the answer to a question they did not ask, and the conversation that follows is about the difference between “the device has no protection” and “the device has protection and it worked”.

A customer with a working unit and no documentation says “read” when the need is a rebuild: they want to change a threshold, and a hex file does not let them.

The clarifying question that resolves all three is short: do you need the bytes, the bytes that are currently blocked, or an understanding of the design.

The read, on a part that is not protected

The device enters programming mode through the standard in-circuit interface, and both arrays are accessible. The program array comes back as words, and the data EEPROM as bytes in its own address space.

Two details matter on this family. The configuration word at the top of the map should be read and decoded rather than treated as trailing data, because on an OTP part it is also the record of what protection state the device was shipped in — information the customer may need years later. And the analogue channel configuration written at initialisation is worth noting, because it is the cheapest cross-check that the image belongs to the product described.

The break, on a part that is protected

Once protection is engaged on this technology, the array does not respond with content. A read returns a uniform pattern, which is a deliberate behaviour rather than a failure of the interface. Recognising that pattern for what it is — the protection working — is the difference between a correct diagnosis and a report claiming the device is empty.

From there the work moves to the die. The package is opened, the array is accessed physically, and the content is reconstructed. The constraints are the ones that apply to any irreversible medium: no retries, the unit is consumed, and the assessment has to be right before the first irreversible step.

The rebuild, which is where the value usually is

A recovered image of a two-kilobyte-word part is small enough to annotate thoroughly, and on an analogue-facing device the annotation is the product.

Three artefacts make the difference. A memory map that names every RAM location by the role it plays. A constant table listing the scale factors, offsets and thresholds with their inferred physical meaning. And a short behaviour note describing the main loop, the sampling rate and the alarm logic, in the language of the application rather than the language of the instruction set.

The third artefact is what allows the customer’s engineer to change a trip point without re-deriving the whole design, and it is routinely omitted from deliveries that focus on the hex file.

What each job cannot deliver

Expectation Available from a read from a break from a rebuild
exact bytes of both arrays yes yes n/a
original source code no no no
equivalent maintainable structure partly partly yes, as equivalent
commercial part numbers of sensors no no sometimes, with caution
a device that behaves identically yes, if config included yes only after rebuilding

The second row is the one that has to be stated plainly and early. Recovery produces bytes and structure; the original source, with its names and comments, exists only on a drive somewhere that is not the microcontroller.

Protection state is the first measurement

Before any of the three jobs can be quoted, one read of the configuration word settles the question, because it is readable on most units even when the array is not. That single measurement decides whether the engagement is a read, a break, or a rebuild that starts from an already-recovered file.

Where a sibling in the same family has more memory and the same converter, PIC16C771 firmware covers the protection mechanism in detail. Where the constants rather than the job type are the subject, PIC16C717 program reads the numbers. And where the part is an eight-pin device whose entire content is under a kilobyte, PIC12F508 code recovery shows how much of the work is physical.

The short version

Read, break and rebuild are three services. Ask which one is needed before quoting, measure the protection state before committing, and deliver the analysis artefacts rather than only the file, because on a part like this the understanding is the product.