本帖最后由 cpu51 于 2014-2-1 15:24 编辑
void port_init(void)
{
PORTA = 0xFF;
DDRA = 0x3F;
PORTB = 0xFF; //KEY_PAD
DDRB = 0x00;
PORTC = 0xFF; //m103 output only
DDRC = 0xFF;
PORTD = 0xF7;
DDRD = 0xFA;
PORTE = 0xFF;
DDRE = 0xFE;
PORTF = 0xB6;
DDRF = 0xFA;
PORTG = 0xFF;
DDRG = 0xFF;
}
main(1)
{
SFIOR=0;
init_devices();
REST_0_lcm;
delay(280); /*延时大约40Ms,等待外设准备好 */
REST_1_lcm;
PORTE|=(1<<PE3); //置高电平 为什么PE3置不了位?始终是低电位
PORTE|=(1<<PE4); //置高电平
while(1)
{;}
} |