BBOTBRUZ
PROJECTS
All projects
Home/Projects/2007 vs 2026: A PIC IR Receiver, Built with AI
IntermediatePICInfraredRetro

2007 vs 2026: A PIC IR Receiver, Built with AI

A modern revisit of a classic PIC infrared receiver using AI assistance to accelerate firmware development.

JM
CREATED BYJMN_Electronics

Hackster maker · Published 2026 · Original project ↗

2007 vs 2026: A PIC IR Receiver, Built with AI finished prototypeFINISHED BUILD · HERO SHOT
PROJECT GUIDE

BUILD TIME1 weekend

TEAMSolo maker

THE IDEA

Why we built it

THE CHALLENGE

Recreate a dependable infrared remote receiver on a resource-constrained PIC while comparing the register-first workflow of 2007 with an AI-assisted workflow in 2026.

OUR SOLUTION

Capture demodulated IR pulse widths with a timer, classify marks and spaces within tolerant ranges, and use AI as a reviewer and drafting partner—not a substitute for datasheet checks.

STORY

From sketch to prototype

The original workflow involved reading the datasheet, calculating timer values by hand, and repeatedly flashing the device to inspect one signal at a time. That discipline still supplies the ground truth.

The 2026 workflow can generate a decoder outline, tests, and explanations quickly. The meaningful comparison is whether faster drafting still produces measured, understandable firmware.

“The best version wasn’t the one with the most features—it was the one people understood fastest.”
THINGS USED

Hardware & tools

QTYCOMPONENTROLE IN THE BUILD
1×PIC microcontrollerTimer capture and protocol decoding
1×38 kHz IR receiverDemodulates the carrier
1×IR remoteTransmits test commands
1×LED + resistorDecoded-command feedback
1×PIC programmerUpload and debugging

Software

MPLAB X IDEXC8 CompilerLogic analyserAI coding assistant
BUILD INSTRUCTIONS

Make it step by step

Observe before decoding

Observe before decoding

Capture several remote keys with a logic analyser and record the leader pulse, bit timing, and repeat frame.

Configure a stable timer

Configure a stable timer

Choose a prescaler with useful microsecond resolution and verify the calculated tick against the captured waveform.

Decode with tolerant ranges

Decode with tolerant ranges

Classify pulses using upper and lower bounds. Reject incomplete frames and update the command only after all bits arrive.

CODE

The core logic

main.c
if (edge_detected) {
  uint16_t ticks = timer_read_and_reset();
  if (within(ticks, ZERO_MIN, ZERO_MAX)) append_bit(0);
  else if (within(ticks, ONE_MIN, ONE_MAX)) append_bit(1);
  else reset_frame();
}
View original Hackster project
REFLECTION

What we learned

  • AI shortens the first draft, but the analyser and datasheet remain authoritative.
  • Timing tolerances matter because remotes and clocks vary.
  • A small state machine is clearer than deeply nested delay-based code.
WHAT’S NEXT?

Create an automated pulse-trace test harness and compare memory use, accuracy, and development time across both workflows.

KEEP EXPLORING

More student builds

AI Robot from Scratch with Arduino UNO Q project preview Watch preview
Arduino · AI · Robotics

AI Robot from Scratch with Arduino UNO Q

A from-scratch mobile robot connecting Arduino motion control with practical edge-AI behaviours.

View project
Raspberry Pi Pico 2 vs Pico W Complete Comparison project preview Watch preview
Raspberry Pi · Comparison · Microcontroller

Raspberry Pi Pico 2 vs Pico W Complete Comparison

A practical side-by-side guide to performance, connectivity, power, compatibility, and ideal use cases.

View project
Traffic Light System project preview Watch preview
Traffic · Automation · Arduino

Traffic Light System

A beginner-friendly intersection controller teaching sequencing, timing, and safe state transitions with LEDs.

View project
BBOTBRUZ
PROJECTS

Built for curious minds and fearless makers.

Explore all projects