⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcddemo__.c

📁 AVRmega16L LCD2004四数据线驱动程序CAVR编译
💻 C
字号:
/* 
  LCD 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 STK500 PORTC header as follows:

  [LCD]   [STK500 PORTC HEADER]
   1 GND- 9  GND
   2 +5V- 10 VCC  
   3 VLC- LCD contrast control voltage 0..1V
   4 RS - 1  PC0
   5 RD - 2  PC1
   6 EN - 3  PC2
  11 D4 - 5  PC4
  12 D5 - 6  PC5
  13 D6 - 7  PC6
  14 D7 - 8  PC7
*/

// the LCD is connected to PORTC outputs
// see the file lcd.h in the ..\inc directory
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm

// include the LCD driver routines
#include <lcd.h>

void main(void)
{
// initialize the LCD for
// 2 lines & 16 columns
lcd_init(40);

// go on the second LCD line
lcd_gotoxy(0,0);

// display the message
lcd_putsf("Gasses Senser Test");

lcd_gotoxy(9,1);
lcd_putsf("TCS-2 v1.2");

lcd_gotoxy(21,0);
lcd_putsf("ShanXiHydz.Co");

lcd_gotoxy(23,1);
lcd_putsf("Tel: 0351-7342006");

// stop here
while (1);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -