Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * File: Final.c
- * Author: John V
- *
- * Created on March 24, 2017, 8:57 PM
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include "Config.h"
- //#include "Peripheral.h"
- #include "ST7735.h"
- #include <xc.h>
- /*
- *
- */
- //hello
- int main() {
- OSCCON = 0b11110000;
- OSCTUNEbits.PLLEN = 1;
- TRISBbits.TRISB1 = 0; //TFT Enable
- TRISBbits.TRISB3 = 0; // D/C
- TRISBbits.TRISB0 = 0; //reset
- TRISBbits.TRISB2 = 1; //SD enable
- TRISD = 0x00;
- // LCD1_CS = 0;
- // LCD1_RS = 0;
- // LCD1_RESET = 0;
- // SDCARD1 = 0;
- //
- // LCD1_CS = 1;
- // LCD1_RS = 1;
- LCD1_RESET = 1;
- // SDCARD1 = 1;
- SPI_init();
- ST7735_initR();
- ST7735_fillScreen(BLACK);
- ST7735_drawChar(50,50, 'f', BLUE, 100);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment