- sbit CAP = P3^2;
- u8 mode = 0;
- void main()
- {
- mode = IapRead(EEPromAddr);
- if(CAP)
- {
- mode++;
- if(mode>=4)mode=0;
- IapProgram(EEPromAddr,mode);
- }
- P3M0 = 0x04; P3M1 = 0x00; //P32推挽输出对电容充电
- switch (mode)
- {
- case 0:
- break;
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- default:
- break;
- }
- while (1)
- {
- }
- }
复制代码 |