Frequently Asked Questions
What made this more than a standard firmware port?
The customer initially expected a compiler migration, moving existing PIC18 code from the CCS compiler to Microchip's XC8. As the project developed, they recognized an opportunity to move to a 32-bit architecture that could support future expansion. That decision changed the scope entirely. The objective became preserving the behavior of a system that had been running reliably for twenty years while rebuilding the foundation beneath it on modern hardware.
How did DE Design Works handle the risk of changing the processor platform mid-project?
The key architectural decision was separating the application logic from processor-specific code early in the project. By building the application layer as a processor-independent module, validated in a Visual Studio console environment before hardware was even selected, the team was able to change target processors three times during development with minimal impact on the application. Almost all changes were isolated to the hardware abstraction layer.
What happened when the new processor didn't have the same peripherals as the original?
The ATSAMC21 didn't include a Parallel Master Port peripheral equivalent to the one the original PIC18 used to communicate with the encoder devices. Rather than redesigning the encoder hardware, DE Design Works developed a software implementation that emulated the required PMP behavior using GPIO. The existing encoder hardware remained unchanged. From the application's perspective, the encoder interface continued behaving as it always had.
How was AI used in this project, and what were its limits?
AI tools including GitHub Copilot and NotebookLM were used as engineering accelerators, not substitutes for engineering judgment. They helped interpret twenty-year-old CCS compiler syntax, summarize component datasheets, and automate repetitive code restructuring. In one case, NotebookLM misread a pin truth table in an encoder datasheet and generated a command sequence that was off by a single bit. The original datasheet remained the source of truth. AI reduced the time required to understand the device, but engineering validation against the primary source was essential at every step.
What does this project demonstrate about legacy embedded system modernization?
Legacy code that has been running successfully for decades often contains engineering decisions that were never documented, they exist only in the behavior of the system. Rewriting working code because it looks dated introduces risk with little customer benefit. The right approach is to understand the existing behavior first, then rewrite only what genuinely no longer works on the new platform. The goal isn't modern code. The goal is reliable code that preserves what customers already trust.


