📄 as5030.cp
字号:
#line 1 "D:/PROJECT FILES/AS5030/AS5030.c"
sbit LCD_RS at PORTB.B0;
sbit LCD_RW at PORTB.B7;
sbit LCD_EN at PORTB.B6;
sbit LCD_D4 at PORTD.B4;
sbit LCD_D5 at PORTD.B5;
sbit LCD_D6 at PORTD.B6;
sbit LCD_D7 at PORTD.B7;
sbit LCD_RS_Direction at DDRB.B0;
sbit LCD_EN_Direction at DDRB.B7;
sbit LCD_RW_Direction at DDRB.B7;
sbit LCD_D4_Direction at DDRD.B4;
sbit LCD_D5_Direction at DDRD.B5;
sbit LCD_D6_Direction at DDRD.B6;
sbit LCD_D7_Direction at DDRD.B7;
char txt1[] = "mikroElektronika";
char txt2[] = "EasyAVR5A";
char txt3[] = "Lcd4bit";
char txt4[] = "example";
char i;
void Move_Delay()
{
Delay_ms(500);
}
void main()
{ LCD_RW = 0;
LCD_RW_Direction = 1;
Lcd_Init();
Lcd_Cmd(LCD_CLEAR);
Lcd_Cmd(LCD_CURSOR_OFF);
Lcd_Out(1,6,txt3);
Lcd_Out(2,6,txt4);
Delay_ms(2000);
Lcd_Cmd(LCD_CLEAR);
Lcd_Out(1,1,txt1);
Lcd_Out(2,4,txt2);
Delay_ms(2000);
for(i=0; i<4; i++)
{ Lcd_Cmd(LCD_SHIFT_RIGHT);
Move_Delay();
}
while(1)
{for(i=0; i<7; i++)
{ Lcd_Cmd(LCD_SHIFT_LEFT);
Move_Delay();
}
for(i=0; i<7; i++)
{Lcd_Cmd(LCD_SHIFT_RIGHT);
Move_Delay();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -