This 5 instruction PIC assembly language program flashes the LEDs on the Low Pin Count Demo Board in an incrementing 4-bit binary sequence at a frequency that is visible to the human eye. How does it work? Can you do more in fewer bytes?
Update: I've now devised a shorter program that flashes the LEDs with just 2 instructions

By Julian

Youtuber, shed dweller, solar charge controller aficionado

4 thoughts on “No longer the world’s shortest microchip pic flashing led program”
  1. Avataaar/Circle Created with python_avatars Mark Wallis says:

    Without using the Origin (ORG) directive the code will be placed at 0x000 onward, bad practice really as many of the interrupt vectors are placed at 0x004 .
    You mention there's no Config set, they must have been set / declared as required, they don't need to be set within the asm file, possibly the chip's reset-state is coincidentally correct for the program to run.

  2. Avataaar/Circle Created with python_avatars Raymond Heath says:

    Being cheap, I built my own Low Pin Count board from the schematics on the Microchip site. Instead of the 4 LED's on RC0-RC3, I installed 4 bi-color LED's on RC0-RC7. When I run your program it flashes re, green and orange, very Christmasy

  3. Avataaar/Circle Created with python_avatars Domino60 says:

    00:45 It's just 5 "instructions" mini lines of code. Now try to build your own Microchip and program it, how many lines will be ? ๐Ÿ˜€

  4. Avataaar/Circle Created with python_avatars Julian Ilett says:

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.