Last active
October 2, 2019 17:03
-
-
Save jakabo27/8332a6d03b593aea5ea6b08ebe9789e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <plib.h> | |
void __ISR(3) function2(void){ | |
//turn on indicator LED - useful to know when it should be communicating | |
for(m = 0; m < 150; m++) // delay for 150ms | |
for(j = 0; j < 312; j++); | |
//turn off indicator LED | |
//Pass data to SPI buffer | |
//increment loop around back to the beginning if past number of array values | |
//Reset flag | |
} | |
main(){ | |
//Globally enable interrupts | |
//Remap pins | |
//Set pins to digital | |
//Set I/O pins | |
//Set up interrupt | |
//Set up SPI | |
//Disable SPI interrupts | |
//Turn SPI off | |
//Clear receive buffer | |
//Disable enhance buffer | |
//Clear SPI flags | |
//Set Baud Rate | |
//between 2 and 1000 | |
//Clear the SPIROV bit | |
//SPI settings | |
//enable DIO | |
//turn it on | |
while(1) | |
{ | |
//Jacob is cool | |
} | |
} | |
delay(int delayTime){ | |
int k, j; | |
for(k = 0; k < delayTime; k++) | |
for(j = 0; j < 312; j++); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment