Guest User

Final.C

a guest
Mar 27th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.81 KB | None | 0 0
  1. /*
  2.  * File:   Final.c
  3.  * Author: John V
  4.  *
  5.  * Created on March 24, 2017, 8:57 PM
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include "Config.h"
  11. //#include "Peripheral.h"
  12.  
  13. #include "ST7735.h"
  14. #include <xc.h>
  15.  
  16.  
  17. /*
  18.  *
  19.  */
  20. //hello
  21. int main() {
  22.    
  23.     OSCCON = 0b11110000;
  24.     OSCTUNEbits.PLLEN = 1;
  25.     TRISBbits.TRISB1 = 0;  //TFT Enable
  26.     TRISBbits.TRISB3 = 0;  // D/C
  27.     TRISBbits.TRISB0 = 0;  //reset
  28.     TRISBbits.TRISB2 = 1;  //SD enable
  29.     TRISD = 0x00;
  30.    
  31. //    LCD1_CS = 0;
  32. //    LCD1_RS = 0;
  33. //    LCD1_RESET = 0;
  34. //    SDCARD1 = 0;
  35. //    
  36. //    LCD1_CS = 1;
  37. //    LCD1_RS = 1;
  38.     LCD1_RESET = 1;
  39. //    SDCARD1 = 1;
  40.    
  41.    
  42.    
  43.     SPI_init();
  44.     ST7735_initR();
  45.     ST7735_fillScreen(BLACK);
  46.     ST7735_drawChar(50,50, 'f', BLUE, 100);
  47.  
  48.     return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment