Georgi Angelov
Published © MIT

Microchip XC16 Arduino

Microchip XC16 Arduino / PlatformIO PIC24F, dsPIV33

BeginnerFull instructions provided65
Microchip XC16 Arduino

Things used in this project

Hardware components

PIC24FJ256GA7 Curiosity
Microchip PIC24FJ256GA7 Curiosity
×1

Story

Read more

Code

Hello World

C/C++
#include <Arduino.h>

void blink()
{
    static unsigned int i = 0;
    static uint32_t begin = millis();
    if (millis() - begin > 200)
    {
        begin = millis();
        digitalToggle(LED);
    }
    if (++i > 60000)
    {
        i = 0;
        Serial.print("MILLIS: ");
        Serial.println(millis());
    }
}

void setup()
{
    Serial.begin(115200); // pins 11 & 12
    Serial.println("PIC24F Hello World 2022 Georgi Angelov");
    pinMode(LED, OUTPUT);
}

void loop()
{
    blink();
    if (Serial.available() > 0)
    {
        Serial.print("CHAR: ");
        Serial.write(Serial.read());
        Serial.println();
    }
}

Credits

Georgi Angelov
11 projects • 16 followers
Contact

Comments

Please log in or sign up to comment.