AVR1602液晶显示程序.docVIP

  • 2
  • 0
  • 约1.27千字
  • 约 3页
  • 2017-06-08 发布于重庆
  • 举报
AVR1602液晶显示程序

#include #include #define uint unsigned int #define uchar unsigned char //显示的数组table[]的内容 const uchar table[] I LIKE AVR; const uchar table1[] I LOVE...; void delay uint ms uint i,j; for i 0;i ms;i++ for j 0;j 1000;j++ ; void write_com uchar com PORTD ~BIT 4 ; PORTD ~BIT 5 ; PORTB com; PORTD | BIT 6 ; delay 1 ; PORTD ~BIT 6 ; void write_data uchar data PORTD | BIT 4 ; PORTD ~BIT 5 ; PORTB data; PORTD | BIT 6 ; delay 1 ; PORTD ~BIT 6 ; void main uint i; DDRB 0XFF; DDRD | BIT 4 |BIT 5 |BIT 6 ; PORTD ~BIT 6 ; write_com 0X38 ; delay 5 ; write_com 0X01 ;

文档评论(0)

1亿VIP精品文档

相关文档