uTools-Manuals/docs/c/UpdateLCD.html
2019-04-08 23:22:26 +08:00

57 lines
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>标准库函数 - UpdateLCD</h1>
<p>原型extern void UpdateLCD(unsigned int mode);</p>
<p>用法:#include &lt;system.h></p>
<p>功能:以指定模式刷新屏幕</p>
<p>说明文曲星屏幕可以按大行行高16点或小行行高8点显示。</p>
<pre>
以CC300的屏幕为例液晶分辨率为112*48即横向可显示112点纵向可显示48点
由于一个大行占据16点小行占据8点故可显示48/16=3大行或48/8=6小行。
大行和小行可以同屏显示。具体哪一行为大行娜一行为小行由mode来决定。
mode低字节从bit7-bit0每一位代表一行为1表示大行为0表示小行。举例如下
mode值 对应二进制值 屏幕显示状态
0xE0 11100000 三大行
0xC0 11000000 两大行,两小行
0x80 10000000 一大行,四小行
0x00 00000000 六小行
0x20 00100000 两小行,一大行,两小行
0x40 01000000 一小行,一大行,三小行
...
以此类推。
</pre>
举例:<pre>
// TextOut.c
#include &lt;system.h>
main()
{
clrscr();
printf("Line 1\n");
printf("Line 2\n");
printf("Line 3\n");
printf("Line 4\n");
printf("Line 5\n");
printf("Line 6\n");
UpdateLCD(0x00); // all are visible
getchar();
UpdateLCD(0xE0); // only first 3 lines visible
getchar();
UpdateLCD(0x40); // line 6 invisible
getchar();
UpdateLCD(0x20); // line 6 invisible
getchar();
return 0;
}
</pre>相关函数:<a href="textmode.html">textmode</a>