PIC18F46J50 Readout: Flash And The USB Stack Inside It

The USB Member Of The J50 Line

Where the J11 family stops at two serial ports, the J50 adds a full-speed USB 2.0 device and host controller to the same core: 64 KB of flash at 0x0000-0xFFFF, 3,776 bytes of SRAM, a ten-bit ADC whose channel count grows with the package, two ECCP modules, two EUSARTs, two MSSPs, the RTCC, CTMU and the PPS remap fabric. The 64-pin version is the one that populates the most ADC inputs and exposes the parallel master port. No EEPROM is present, so calibration and descriptor tables live in flash alongside the code.

A USB product built on this part almost always has two distinct software bodies in one image: the application, and the enumeration and class stack that talks to the host. That second body is the one clients most often want back, because the descriptor set, the endpoint allocation and the class-specific request handlers encode decisions that are expensive to re-derive.

Sweep Boundaries

– Array: 0x0000-0xFFFF, 0x3FFF per erased word. – Configuration: 0x300000-0x300007, protect and write-protect bits distributed across four config registers. – ID: 0x3FFFFE-0x3FFFFF. – Erase granularity 1 KB, so a partial overlay always lands on a block boundary.

The order matters on USB parts more than on others: if the configuration is read before the array, the write-protect bits tell the operator whether the boot block was ever rewritten in the field – a fact that decides whether the recovered image is the factory build or a field-updated one.

Reading The Disassembly

Endpoint buffers and the dual-port RAM window show up as a run of register pairs written in a tight loop right after reset, followed by the descriptor tables in program memory and a table of function pointers into the class handler. On parts that also drive a display or a motor, those blocks sit after the stack in address order, which gives a clean split point for review.

The PPS table again records pin assignment, and on a 64-pin part it is long – the largest single constant block in most images.

Where A Session Can Go Wrong

The commonest complication is a part that has been reflashed over USB in the field with a bootloader that left the write-protect bits set over the low block. The array still reads, but the low 1 KB comes back as a locked pattern while the rest is intact, and the operator has to treat the boot region as a separate recovery target. The second complication is a VBUS-damaged part: the USB transceiver is dead but the core still answers, which is recoverable; a shorted VUSB pin is not, and that part goes to decapsulation.

Handover

HEX at word addresses, an annotated disassembly with the USB stack, the descriptor block and the application separated by address range, a configuration report, and a checksum tied to the die. The original protection is left as found and the part returns to service.

The non-USB equivalent is the PIC18F46J11, and the 28-pin USB part is the PIC18F26J50. For a part with the same pin count but a different converter, see the PIC18F24J50 page.

Before You Send It

Include the host-side description if one exists, and note whether the unit still enumerates. A part that enumerates tells the operator the transceiver is intact and the read will be uneventful; a part that does not may still be perfectly readable, but the functional test afterwards needs to distinguish a dead port from damaged firmware.

Reporting The Stack Version

Where the descriptor set carries a version string, it is quoted verbatim in the report. That single field often tells a client which firmware revision the unit was running, which is otherwise impossible to determine from a locked part.

Send the marking and the host-side description through the services desk or the contact form.

Service scope and next steps

Before we quote a PIC job we confirm the silicon revision and the protection configuration, because both decide whether the on-chip programming area can be read directly or needs a different approach. The full scope of what we handle, how a project runs from electrical integrity test to delivered file, and the payment terms are described on our service capabilities page.

Ready to extract this PIC firmware?

Send us the part number and a short description of what you need. Free evaluation, fixed quotation, and a reply within one business day.

Request a quotation

Comments

One response to “PIC18F46J50 Readout: Flash And The USB Stack Inside It”

  1. […] the board uses a larger PIC18 with USB, the PIC18F46J50 and the PIC18F24J50 pages cover those memory maps. For a 28-pin non-USB part of similar size, see […]

Leave a Reply

Your email address will not be published. Required fields are marked *