repo_id
stringclasses
1 value
file_path
stringlengths
49
87
content
stringlengths
25
158
__index_level_0__
int64
0
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>如果PA6输入状态为高<code>if(PORTAbits.PA6 == 1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>限制R_OSCCAL_TEMP的值<code>if(R_OSCCAL_TEMP > 0x7FF) R_OSCCAL_TEMP = 0x7FF;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>调用子程序加载到OSCCAL<code>F_LoadtoOSCCAL();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>如果PA6输入状态为低<code>else
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>调用子程序加载到OSCCAL<code>F_LoadtoOSCCAL();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>等待PA7输入状态变化<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>延时3000个循环,去抖动<code>delay(3000);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>跳出循环,继续执行主程序<code>break;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>将R_OSCCAL_TEMP的低字节加载到OSCCALL<code>OSCCALL = (char) R_OSCCAL_TEMP;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>将R_OSCCAL_TEMP的高字节加载到OSCCALH<code>OSCCALH = (R_OSCCAL_TEMP >> 8);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\OSCALL.c
<comment>循环count次,实现延时<code>for(i = 1; i <= count; i++)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>包含NY8A051F的宏定义<code>#include "NY8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>PWM占空比0%<code>#define C_PWM_LB_DUTY_00H 0x00
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>PWM占空比40%<code>#define C_PWM_LB_DUTY_40H 0x40
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>PWM占空比1%<code>#define C_PWM_LB_DUTY_01H 0x01
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>PWM占空比100%<code>#define C_PWM_LB_DUTY_FFH 0xFF
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>更新寄存器宏定义<code>#define UPDATE_REG(x) __asm__(\"MOVR _\" #x \",F\")
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>禁用所有未屏蔽的中断<code>DISI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>设置PortB为输出端口<code>IOSTB = C_PB_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>清除PortB数据寄存器<code>PORTB = 0x00;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>启用WDT和LVR<code>PCON = C_WDT_En | C_LVR_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>设置TMR1_Data_b9, TMR1_Data_b8, PWM2_Duty_b9, PWM2_Duty_b8为1<code>TMRH = C_TMR1_Data_b9 | C_TMR1_Data_b8 | C_PWM2_Duty_b9 | C_PWM2_Duty_b8;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>将0xFF移动到TMR1低字节寄存器(TMR1[9:0]=3FFH)<code>TMR1 = 0xFF;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>将0x01移动到PWM1DUTY低字节寄存器(PWM1DUTY[9:0]=001H)<code>PWM1DUTY = 0x01;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>将0xFF移动到PWM2DUTY低字节寄存器(PWM2DUTY[9:0]=3FFH)<code>PWM2DUTY = 0xFF;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>Prescaler1设置为1:1,Timer1时钟源为指令时钟<code>T1CR2 = C_PS1_Dis | C_TMR1_ClkSrc_Inst;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>启用PWM1,活动高电平,非停止模式,从TMR1[9:0]重新加载,启用Timer1<code>T1CR1 = C_PWM1_En | C_PWM1_Active_Hi | C_TMR1_Reload | C_TMR1_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>启用PWM2,活动高电平<code>P2CR1 = C_PWM2_En | C_PWM2_Active_Hi;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>设置PWM3_Duty_b9, PWM3_Duty_b8为1<code>PWM3RH = C_PWM3_Duty_b9 | C_PWM3_Duty_b8;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>将0x00移动到PWM3DUTY低字节寄存器(PWM3DUTY[9:0]=300H)<code>PWM3DUTY = C_PWM_LB_DUTY_00H;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>启用PWM3,活动高电平<code>P3CR1 = C_PWM3_En | C_PWM3_Active_Hi;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\PWM_Output.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>包含ROM访问的头文件<code>#include <ny8_romaccess.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>包含ROM定义<code>#include "rom.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>包含NY8A051F的宏定义<code>#include "ny8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>用于存储读取的滚动码<code>unsigned char r_tmp;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置所有PORTB为输出模式<code>IOSTB = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置PORTB数据缓冲器为2(PB1输出高电平)<code>PORTB = 2;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>如果读取的滚动码与预期的0x44不匹配<code>if(r_tmp != 0x44)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置PB1输出低电平<code>PORTBbits.PB1 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>如果读取的滚动码与预期的0x33不匹配<code>if(r_tmp != 0x33)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置PB1输出低电平<code>PORTBbits.PB1 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>如果读取的滚动码与预期的0x22不匹配<code>if(r_tmp != 0x22)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置PB1输出低电平<code>PORTBbits.PB1 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>如果读取的滚动码与预期的0x11不匹配<code>if(r_tmp != 0x11)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>设置PB1输出低电平<code>PORTBbits.PB1 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Custom.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>包含ROM访问的头文件<code>#include <ny8_romaccess.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>包含ROM定义<code>#include "rom.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>包含NY8A051F的宏定义<code>#include "ny8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>用于存储滚动码的数组<code>char rolling_code[3];
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>滚动码位7~位0<code>#define C_RC_B0 0x55
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>滚动码位15~位8<code>#define C_RC_B1 0xAA
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>滚动码位19~位16<code>#define C_RC_B2 0x0E
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>用于存储读取的14位ROM数据<code>int r_tmp;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>设置所有PORTB为输出模式<code>IOSTB = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>设置PORTB数据缓冲器为0(输出低电平)<code>PORTB = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>读取14位ROM数据<code>r_tmp = read_14bit_rom(&__rolling_code_addr);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>ROM数据{0x00E} [7:0]<code>rolling_code[0] = r_tmp & 0xff;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>ROM数据{0x00E} [9:8]<code>rolling_code[1] = (r_tmp >> 8) & 0x03;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>读取14位ROM数据<code>r_tmp = read_14bit_rom(&__rolling_code_addr + 1);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>ROM数据{0x00F} [15:10]<code>rolling_code[1] |= (r_tmp & 0x3f) << 2;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>ROM数据{0x00F} [19:16]<code>rolling_code[2] = (r_tmp >> 6) & 0x0f;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Rolling_Code_Preset.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>包含NY8A051F的宏定义<code>#include "ny8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>Halt模式标志<code>#define HALT_MODE 0x04
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>高频振荡器选择标志<code>#define FHOSC_SEL 0x01
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>Standby模式标志<code>#define STANDBY_MODE 0x08
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>更新寄存器宏定义<code>#define UPDATE_REG(x) __asm__(\"MOVR _\" #x \",F\")
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>如果PBIF(PortB输入变化中断标志位)被设置<code>if(INTFbits.PBIF)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>清除PBIF<code>INTFbits.PBIF = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>禁用所有未屏蔽的中断<code>DISI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>使能PB1的上拉电阻<code>BPHCON = (unsigned char)~C_PB1_PHB;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>使能PB1输入变化唤醒功能<code>BWUCON = C_PB1_Wakeup;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>设置PB1为输入模式,其他为输出模式<code>IOSTB = C_PB1_Input;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>设置PORTB数据缓冲器为0x00<code>PORTB = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>使能PortB输入变化中断<code>INTE = C_INT_PBKey;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>清除所有中断标志<code>INTF = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>OSCCR[0]=0,FOSC为低频振荡器(FLOSC)<code>OSCCR = C_FLOSC_Sel;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>OSCCR[0]=1,FOSC为高频振荡器(FHOSC)<code>OSCCR = C_FHOSC_Sel;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>1. 使能所有未屏蔽的中断。2. 从Halt模式或Standby模式唤醒后,程序将进入中断服务例程<code>ENI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>设置PB2输出高电平<code>PORTBbits.PB2 = 1;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>禁用WDT<code>PCONbits.WDTEN = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>读取PORTB数据缓冲器<code>UPDATE_REG(PORTB);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>1. 执行指令进入Halt模式(从Normal模式)<code>SLEEP();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>使能WDT<code>PCONbits.WDTEN = 1;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>从Halt模式唤醒后设置PB2输出低电平<code>PORTBbits.PB2 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>清除PBIF<code>INTFbits.PBIF = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>禁用WDT<code>PCONbits.WDTEN = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>读取PORTB数据缓冲器<code>UPDATE_REG(PORTB);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>设置OSCCR寄存器进入Standby模式(从Normal模式)<code>OSCCR = STANDBY_MODE | FHOSC_SEL;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Sleep_Wakeup.c
<comment>使能WDT<code>PCONbits.WDTEN = 1;
0