⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 dsPIC30F4011 + CLCD 4*16ch (flexible pin I/O) >> MPLAB Project files >> C30-compile
💻 C
字号:

//**************************************************************************//
//       dsPIC30F4011  + LCD       										    //	
//       by >> wlasoi@hotmail.com                                           //  
//       Dept. of Physics , Fact. of Science , Ubonrajathanee University    //  
//                                                                          // 
//       " OpenSource "                                                     // 
//                                                                          // 
//**************************************************************************//

#include  <p30f4011.h>     
#include  <stdio.h>  

//**************************************************************************//
//                          Include header Files                            // 
//**************************************************************************//

#include  "..\h\main.h"
#include  "..\h\delay.h"
#include  "..\h\lcd.h"

char tempchar[40];

//**************************************************************************//
//                          Prototype Funtion                               // 
//**************************************************************************//

#define  E5_TRIS   TRISEbits.TRISE5
#define  E5        LATEbits.LATE5      	 // LCD E signal 
#define  DataE5    PORTEbits.RE5         // Port for LCD data

int main(void)
{		

    OSCCONbits.POST=0;  // not post scale (8MHz*16PLL / (1post*4)) = 32
                    
    while(OSCCONbits.LOCK!=1) {};

    Delay(Delay_50mS_Cnt);
	E5_TRIS = 0;
    E5  = 0;
    //ADPCFG = 0xFF;			//Make analog pins digital 

    init_lcd();
    clrscr();
    lcd_gotoxy(1,1);
    lcd_puts("Test LCD");

    while (1)
    {
        E5  = 0;
        clrscr();
 		Delay(Delay_1S_Cnt);

        E5  = 1;
	    lcd_gotoxy(1,1);
    	lcd_puts("Test LCD");
 		Delay(Delay_1S_Cnt);
    }
}

//**************************************************************************//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -