AVR16__AD转换与ADC及扩展汇编.pptVIP

  • 71
  • 0
  • 约1.42万字
  • 约 82页
  • 2016-12-02 发布于湖北
  • 举报
(4)、字符LCD 三、AVR通用I/O口 6)void LCD_write_com(unsigned char com) 写命令到LCD。 (4)、字符LCD 三、AVR通用I/O口 初始化及主程序: #include iom16v.h #include lcd1602.h void main(void) {?unsigned char i; ?unsigned char *p; ?PORTA = 0xFF;??? ?/*打开上拉*/ ?DDRA = 0x00;??? ?/*方向输入*/ ?PORTB = 0xFF;??? /*电平设置*/ ?DDRB = 0xFF;???? /*方向输出*/ ?PORTC = 0x7F; ?DDRC = 0x80; ?PORTD = 0xFF; ?DDRD = 0x00; delay_ms(100); ?LCD_init(); while (1) { ?? i = 1; ?? p = “LCD-1602-test”; ?? LCD_clear(); ?? LCD_write_str(5,0,Welcome); ?? delay_ms(250);?? ? while (*p) { LCD_write_char(i,1,*p); ??? i ++; ??? p ++; ??? delay_m

文档评论(0)

1亿VIP精品文档

相关文档