Bus Pirate v3 PIC 24FJ blinking LED programming tutorial
From DP
Basic get started Demo. Use the Bus Pirate V3.x to blink the user programmable MODE LED
Contents |
Overview
The Bus Pirate uses the PIC24FJ64GA002 microcontrooler, and as such it can be used as a development board for the same, with some limitations. One of the pins is connected directly to the MODE LED and in this demo we will write just the basic code that is needed to blink that LED.
Basic Configuration
#include <p24fxxxx.h> _CONFIG1( JTAGEN_OFF & //JTAG port is disabled GCP_OFF & //GSP Memory Code Protection OFF GWRP_OFF & //GCC Flash Write Protection OFF COE_OFF & // FWDTEN_OFF & //Watchdog Timer OFF ICS_PGx1) //debug over PGD1 and PGC1 _CONFIG2( FNOSC_FRCPLL & //Internal FRC with PLL OSCIOFNC_ON & //RA3 is clk out (fosc/2) POSCMOD_NONE & //Primary oscillator disabled I2C1SEL_PRI) //Use default SCL1/SDA1 pins #pragma code
