PIC24FJ64GB002 LED Blink example with CCS C compiler

This small post shows how to simply blink an LED using PIC24FJ64GB002 16-bit microcontroller and CCS C compiler.

Hardware Required:

  • PIC24FJ64GB002 microcontroller
  • AMS1117 3V3 voltage regulator
  • 2 x 10uF polarized capacitor
  • 4 x 0.1uF ceramic capacitor
  • 10K ohm resistor
  • 100 ohm resistor
  • 330 ohm resistor
  • LED
  • 5V source
  • Breadboard
  • Jumper wires

PIC24FJ64GB002 LED Blink example circuit:

pic24fj64gb002 LED blink circuit

The PIC24FJ64GB002 microcontroller works with 3.3V only and supply it we need a 3.3V source or a 5V source and AMS1117 3V3 voltage regulator.
The LED is connected to pin RB0 through 330 ohm resistor.
In this example the PIC24FJ64GB002 microcontroller runs with its internal oscillator.

PIC24FJ64GB002 LED Blink example C code:
The C code below was tested with CCS C compiler version 5.051.
In this example the LED blinks with a frequency of 1Hz (500ms ON and 500ms OFF ==> period = 1s).

Leave a Reply

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