Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 126 → Rev 127

/PIC Stuff/PIC_27J13/oled_ssd1331.c/oled_ssd1331.c
70,12 → 70,12
 
// set x and y coordinate
buffer[0] = (SSD1331_CMD_SETCOLUMN);
buffer[1] = (x);
buffer[2] = (SSD1331_LCDWIDTH - 1);
buffer[1] = (x); // Start x address
buffer[2] = (SSD1331_LCDWIDTH - 1); // End x address
 
buffer[3] = (SSD1331_CMD_SETROW);
buffer[4] = (y);
buffer[5] = (SSD1331_LCDHEIGHT - 1);
buffer[4] = (y); // Start y address
buffer[5] = (SSD1331_LCDHEIGHT - 1); // End y address
 
LATBbits.LATB5 = 0; // D/C low (cmd)
SPI2_Write(buffer, 6);