LED Blinking and Proteus code Simulation
This post is all about Blinking LED on PIC24 16bit Microcontroller and Simulating on Proteus. Same procedure is used in Dspic33F and Dspic30F. The code is written in C30 compiler. The circuit is shown below. Code and circuit can be downloaded from the links below.
In figure above we have an LED connected to Port B of PIC24F04KA201 by writing 1 to this pin this LED will glow and with writing 0 LED will not glow. I used resister in series so that it will limit the current flowing through the LED. Which is a good practice as a hardware engineer. Otherwise in hardware LED may burn.
|Code C30 compiler and MPLAB X|
In figure above we have a code for it I used general delay which is compiler dependent and you may increase delay up to certain level by increasing the value passed in delay function. I am using 8MHz crystal.
Now we have a blinking LED.
Downloads code + Proteus
If you want to download code and Proteus Click here