- Published: Tuesday, 16 November 2010
- Written by Graham Mitchell
The flashing LED - an iconic starting point for many embedded hobbyists and professionals alike. There are several reasons that contribute to the popularity of the humble flashing LED program, simplicity is likely the greatest influence followed closely by its reliability as a test program.
I should clear up something now rather than later: pre-made delay libraries or other "simpler" means for creating delays could have been employed in this project. Timer1 has been used as I wanted to get familiar with one of the other onboard peripherals at the same time. The code is still very easy to follow, so don't be mislead by the perceived difficulty (if there is any?)
The following video demonstrates the completed project. The code is explained further on in the article.
Correction - I say "once every second" though the program is designed to toggle every 500mS.
You too can replicate this project by either building your own circuit or using the Explorer 16 Development board by Microchip, with the PIC24FJ128GA010 installed. Note - If you're unfamiliar with these devices, perhaps the following article would be worth a read: "Handy Resources for PIC24 + C30". And there's always the Digital DIY forum for guidance as well.