emailing-files-is-still-better / Ir-Blinky

PIC IR blinker for simple raw data
2 stars 1 forks source link

Intended final code #5

Open georgev93 opened 1 year ago

georgev93 commented 1 year ago

Ideally, we'd want the code to look something like this:

// Modify this value!
#define CODE    00100010    // Address to transmit out

#define PREAMBLE 000100111000100111

void setup() {
pinMode(LED, OUTPUT);
}

void loop() {
output(PREAMBLE);
output(CODE);
delay(some_amount);
}
georgev93 commented 1 year ago

If we can abstract away anything that makes this Arduino-specific (clock speed, pin-setting function), this will be a very easy port to PIC

emailing-files-is-still-better commented 1 year ago

So for the board, I am guessing I choose the cheapest option on dirty for each drop down. What's the pic programming software called?

georgev93 commented 1 year ago

Yep, cheapest options. You can pick from many free colors as well.

The software is "MPLAB X". It will prompt you at the end that you need to download compilers separately. Since this is an 8-bit microcontroller, you'll need to download the "XC8" compiler

emailing-files-is-still-better commented 1 year ago

image Aside from what the pic actually decides to out put in terms of tmr2 period, this looks pretty good to me. I left the clock at 8mhz but may try bumping that up at a later time just to see what breaks.