diff --git a/testing/examples/PIC32/BlinkingLeds.c b/testing/examples/PIC32/BlinkingLeds.c new file mode 100644 index 000000000..d1647c459 --- /dev/null +++ b/testing/examples/PIC32/BlinkingLeds.c @@ -0,0 +1,23 @@ +#include +int main(void) +{ + int i; + mPORTDClearBits(BIT_0); + mPORTDSetPinsDigitalOut(BIT_0); + mPORTDClearBits(BIT_1); + mPORTDSetPinsDigitalOut(BIT_1); + mPORTDClearBits(BIT_2); + mPORTDSetPinsDigitalOut(BIT_2); + + while(1) + { + for(i = 0; i < 500000; i++) + mPORTDToggleBits(BIT_0); + for(i = 0; i < 500000; i++) + mPORTDToggleBits(BIT_1); + for(i = 0; i < 500000; i++) + mPORTDToggleBits(BIT_2); + } + + return 0; +} diff --git a/testing/examples/PIC32/BlinkingLeds.elf b/testing/examples/PIC32/BlinkingLeds.elf new file mode 100644 index 000000000..593164ba0 Binary files /dev/null and b/testing/examples/PIC32/BlinkingLeds.elf differ diff --git a/testing/examples/PIC32/readme.txt b/testing/examples/PIC32/readme.txt new file mode 100644 index 000000000..ca9573a5a --- /dev/null +++ b/testing/examples/PIC32/readme.txt @@ -0,0 +1,4 @@ +Here you'll find a simple example tested with PIC32 Starter kit (source code and .elf file). It will blink repeatedly the LEDs on the board. +The program was compiled and written on the target using MPLAB IDE v 8.0 that comes with the kit because openocd is missing currently the ability +to program the flash for this specific target. It is possible in the future this limitation to be removed. + \ No newline at end of file