?? lcdchar.c
字號:
/*
LCD user defined characters demo
CodeVisionAVR C Compiler
(C) 2000-2002 HP InfoTech S.R.L.
www.hpinfotech.ro
Chip: AT90S8515
Memory Model: SMALL
Data Stack Size: 128 bytes
Use an 2x16 alphanumeric LCD connected
to the STK200/300 LCD header.
The connections between the LCD and the
board must be as short as possible.
*/
// include the LCD driver routines for the STK200/300
#include <lcdstk.h>
typedef unsigned char byte;
// table for the user defined character
// arrow that points to the top right corner
flash byte char0[8]={
0b0000000,
0b0001111,
0b0000011,
0b0000101,
0b0001001,
0b0010000,
0b0100000,
0b1000000};
// function used to define user characters
void define_char(byte flash *pc,byte char_code)
{
byte i,a;
a=(char_code<<3)|0x40;
for (i=0; i<8; i++) lcd_write_byte(a++,*pc++);
}
void main(void)
{
// initialize the LCD for
// 2 lines & 16 columns
lcd_init(16);
// define user character 0
define_char(char0,0);
// switch to writing in Display RAM
lcd_gotoxy(0,0);
// display the user defined characters
lcd_putsf("User defined\nchar 0:");
// display the user defined char 0
lcd_putchar(0);
// stop here
while (1);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -