|
马老师你好,这是你书上的例子:
#include<mega16.h>
#include<delay.h>
#include<lcd.h>
#asm
.equ__lcd_port=0x15 ;
#endasm
/*[LCD]
1 GND- 9GND
2 +5V- 10VCC
3 VLC- LCD HEADER Vo
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 */
flash char dis_str[]="Hello World!This is a LCD dislay demo.";
void main()
{
char flash *str;
str=dis_str;
lcd_init(16);
while(1)
{
lcd_clear();
lcd_putsf("It's demo_6_8.c");
lcd_gotoxy(0,1);
lcd_putsf(str);
if(*str++==0) str=dis_str;
delay_ms(500);
}
}
但是程序运行错误提示Error: C:\Documents and Settings\Administrator\桌面\AVR学习笔记\AVRCX\LCD1\List\LCD1.asm(1169) Invalid directive: '.equ__lcd_port' 我不知道应该怎么改。老师我是初学者,帮帮忙,O(∩_∩)O谢谢 |
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|