📄 8 led interface.c
字号:
// Program to ON the LED on the port Pin
#include <16c84.h>
#USE DELAY( CLOCK=4000000 )
#FUSES XT,NOWDT,NOPROTECT,NOPUT
#byte port_b=6
main(){
byte cnt; value;
set_tris_b(0);
port_b = 0;
value = 0x01;
while( TRUE )
{
cnt = 0;
while ( cnt<8 )
{
port_b = value;
DELAY_MS(1000);
value = value << 1;
cnt++;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -