新手问下51扩展8155的问题
时间:10-02
整理:3721RD
点击:
int main(){
INT8U i;
DDRA=0xff;DDRB=0xff;DDRC=0xff;
DDRD=0x00;PORTD=0xff;
MCUCR=0x82; *COMM_8155=0x03;
while(1)
{
for(i=0;i<4;i++)
{
*PB_8155=0x00;
*PA_8155=SEG_CODE[Disp_Buffer];
*PB_8155=1<<(7-i);
delay_ms(1);
key_process();
}
}
在AVR中 DDRA=0xff; DDRB=0xff; DDRC=0xff; DDRD=0x00; PORTD=0xff; MCUCR=0x82;那么在51中怎么配置端口啊?
INT8U i;
DDRA=0xff;DDRB=0xff;DDRC=0xff;
DDRD=0x00;PORTD=0xff;
MCUCR=0x82; *COMM_8155=0x03;
while(1)
{
for(i=0;i<4;i++)
{
*PB_8155=0x00;
*PA_8155=SEG_CODE[Disp_Buffer];
*PB_8155=1<<(7-i);
delay_ms(1);
key_process();
}
}
在AVR中 DDRA=0xff; DDRB=0xff; DDRC=0xff; DDRD=0x00; PORTD=0xff; MCUCR=0x82;那么在51中怎么配置端口啊?
