Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
unsigned int writeSpi(unsigned int data){
PIR1bits.SSPIF = 0;
SSPBUF = (data / 256) & 0x00FF;
while(!PIR1bits.SSPIF);
unsigned int returndata = SSPBUF * 256;
PIR1bits.SSPIF = 0;
SSPBUF = data & 0x00FF;
while(!PIR1bits.SSPIF);
returndata += SSPBUF;
return returndata;
}