?? main.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 + -