AVR单片机对电子时钟的设计-#include
#include
#include
#include
#defineucharunsignedchar
#defineuintunsignedint
#definextal8
#defineCSPA5
#defineSIDPA6
#defineSCLKPA7
AVR单片的外部中断应用设计-#include
#include
#include interrupt.h》
void port_init(void)
{
DDRB = 0xff;
PORTB = 0xff;
DDRD = 0x00;
PORTD |= (1 《《 2);
AVR单片机对数码管数据P0口与P2口的控制设计-code const ucharLED_7[16] = {0x28, 0x7E, 0xA2, 0x62, 0x74, 0x61, 0x21, 0x7A, 0x20, 0x60,0xff};//common of +
code const uchar position[8] = {0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};