?? printf.c
字號:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// MPLAB IDE V7.11 + CCS C3.18
// LED2 for MCD2-demo
//
// by LW7807@163.com
// 2005/06/16
//////////////////////////////////////////////////////////////////////////////
#include<16f87.h>
#fuses HS,NOWDT,NOPROTECT,PUT,BROWNOUT,NOLVP
#use delay(CLOCK=20000000)
#use fast_io(B)
int const LED_SEG[11]={0x7E,0x0C,0xB6,0x9E,0xCC,0xDA,0xFA,0x0E,0xFE,0xCE,0x80};
void main()
{
int i,j,m=0,n=0;
set_tris_b(0x00);
while(1)
{
for(i=0,i<10,i++)
{
for(j=0,j<166,j++)
{
output_b(LED_SEG[m]);
output_high(PIN_C5);
delay_ms(3);
output_low(PIN_C5);
output_b(led_seg[n]);
output_high(PIN_C0);
delay_ms(3);
output_low(PIN_C0);
}
m++;
if(m>9)
{
m=0;
n++;
if(n>9)
n=0;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -