ATmega16基于1302的时钟.docVIP

  • 7
  • 0
  • 约5.86千字
  • 约 8页
  • 2016-03-03 发布于重庆
  • 举报
ATmega16基于1302的时钟.doc

/ICC-AVR application builder : 2005-01-04 04:58:01 // Target : M16 // Crystal: 4.0000Mhz #include iom16v.h #include macros.h #define IO PB5 #define SCLK PB7 #define RST PB4 #define IO_0 PORTB=~BIT(IO) #define IO_1 PORTB|=BIT(IO) #define SCLK_0 PORTB=~BIT(SCLK) #define SCLK_1 PORTB|=BIT(SCLK) #define RST_0 PORTB=~BIT(RST) #define RST_1 PORTB|=BIT(RST) #define IO_PULL PORTB|=BIT(IO) #define IO_in DDRB=~BIT(IO) #define IO_READ (PINB(BIT(IO))) #define IO_OUT DDRB|=BIT(IO) #define RS PD1 #define E PD0 #define RS_0 PORTD=~BIT(RS) #define RS_1 PORTD|=BIT(RS) #define E_0 PO

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档