lcd_c._c

来自「1602液晶显示模块」· _C 代码 · 共 39 行

_C
39
字号
/*----------------------------------------------------
主函数
编译器:ICC-AVR v6.31A 日期: 2005-11-24 20:29:57
目标芯片 : M8
时钟: 8.0000Mhz
---------------------------------------------------*/

#include "LCD.h"


void init_devices(void)
{
  CLI(); //disable all interrupts
  LCD_init();
  MCUCR = 0x00;
  GICR  = 0x00;
  TIMSK = 0x00; //timer interrupt sources
  SEI(); //re-enable interrupts
}
void port_init(void)
{
 PORTB = 0x00;
 DDRB  = 0x00;
 PORTC = 0x00; //m103 output only
 DDRC  = 0xff;
 PORTD = 0x00;
 DDRD  = 0xFF;
}
void main(void)
{  port_init();
   init_devices();
   LCD_write_string(1,0,"Hi!!");
   for(;;)
   {
   LCD_write_string(0,1,"zhanyn年");
   LCD_write_char(6,0,'8');   
   }
 
}

⌨️ 快捷键说明

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