?? tsk_lcd.c
字號(hào):
/********************************/
//定義字符串?dāng)?shù)組
/********************************/
char code STR1[]={ 0x80,0x81,0x82,0x83,0x84,0x85 };
char code STR2[]="em12864 ";
#include <reg52.h> /* special function registers 8052 */
#include <rtx51tny.h> /* RTX-51 tiny functions & defines */
#include <stdio.h> /* standard I/O .h-file */
#include <string.h> /* string and memory functions */
#include <lcd.h> /* string and memory functions */
#include <MATYP.h>
/******************************************************************************/
/* Task 7 'lcd_tsk': */
/******************************************************************************/
void lcd_tsk (void) _task_ LCD_TSK
{
Uchar x=0;
Lcminit(); /*液晶模塊初始化,包括全屏幕清屏*/
Putstr(0,0,STR2,6); /*第一行字符輸出,24字節(jié) */
os_wait (K_TMO, 20, 0);
Putstr(0,2,STR1,8); /*第二行字符輸出,12字節(jié)(漢字)*/
os_wait (K_TMO, 20, 0);
Linexy(0,0,127,0); /*line (0,0)-(191,0) */
os_wait (K_TMO, 20, 0);
Linexy(127,0,127,32); /*line (191,0)-(191,32) */
os_wait (K_TMO, 20, 0);
Linexy(127,32,0,32); /*line (191,32)-(0,32) */
os_wait (K_TMO, 20, 0);
Linexy(0,32,0,0); /*line (0,32)-(0,0) */
os_wait (K_TMO, 20, 0);
Linexy(1,15,127,15); /*line (1,15)-(191,15) */
os_wait (K_TMO, 20, 0);
Linexy(0,63,44,33); /*line (0,63)-(44,33) */
os_wait (K_TMO, 20, 0);
Linexy(44,33,127,63); /*line (44,33)-(191,63) */
os_wait (K_TMO, 20, 0);
circle(46,49,12); //畫一個(gè)圓
os_wait (K_TMO, 20, 0);
circle(46,49,11);
// D_Ads1110[0])
while(1){
Rollscreen(x); /*定位新的顯示起始行 */
os_wait(K_TMO, 5, 0);
x++;
if (x>64)
{
x=0;
os_wait(K_TMO,500, 0);
}
};
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -