lesson1_2.lst
来自「天祥的所有pic 源程序」· LST 代码 · 共 25 行
LST
25 行
1: #include<pic.h>
2: #define uchar unsigned char
3: #define uint unsigned int
4: __CONFIG(0x3B31);
5: void delay(uint x)
6: {
7: uint a,b;
8: for(a=x;a>0;a--)
9: for(b=110;b>0;b--);
10: }
11: void main()
12: {
13: uchar i;
14: TRISD=0x00;
15: while(1)
16: {
17: PORTD=0x01;
18: for(i=8;i>0;i--)
19: {
20: delay(200);
21: PORTD=PORTD<<1;
22: }
23: }
24: }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?