xtest04_1.c
来自「AT91sam7s 256 B/D example」· C语言 代码 · 共 46 行
C
46 行
/* ========================================================================== */
/* Xtest04_1.c : Basic Text LCD Display */
/* ========================================================================== */
/* Designed and programmed by Duck-Yong Yoon in 2007. */
#include "AT91SAM7S256.h"
#include "lib_AT91SAM7S256.h"
#include "OK7S256ads.h"
int main(void)
{
unsigned int i;
MCU_initialize(); // initialize AT91SAM7S256 & kit
Delay_ms(50); // wait for system stabilization
LCD_initialize(); // initialize text LCD
while(1)
{ Beep();
LCD_string(0x80, " OK-7S256 V1.0 "); // logo title 1
LCD_string(0xC0, "AT91SAM7S256 ARM");
Delay_ms(2000);
LCD_string(0xC0, " 2007/06/01 "); // logo title 2
Delay_ms(2000);
LCD_string(0xC0, " Ohm Books Co. "); // logo title 3
Delay_ms(2000);
Beep();
LCD_string(0x80,"0123456789ABCDEF0123456789ABCDEF"); // display long line
LCD_string(0xC0,"Go shift left and right 16 times");
Delay_ms(1000);
for(i=0; i<16; i++) // shift left
{ LCD_command(0x18);
Delay_ms(300);
}
Delay_ms(1000);
for(i=0; i<16; i++) // shift right
{ LCD_command(0x1C);
Delay_ms(300);
}
Delay_ms(1000);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?