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\Timer_Interrupt_WDT_Interrupt.c
<comment>禁用Timer0<code>PCON1 = C_TMR0_Dis;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>将0x00加载到TMR0(初始Timer0寄存器)<code>TMR0 = 0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>将Prescaler0分配给Timer0,Prescaler0分频率为1:8,时钟源为指令时钟<code>T0MD = C_PS0_TMR0 | C_PS0_Div8;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>将0xFF加载到TMR1(初始Timer1寄存器)<code>TMR1 = 0xFF;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>启用Timer1,初始值从TMR1重新加载,非停止模式<code>T1CR1 = C_TMR1_Reload | C_TMR1_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>启用Prescaler1,Prescaler1分频率为1:4,Timer1时钟源为指令时钟<code>T1CR2 = C_TMR1_ClkSrc_Inst | C_PS1_Div4;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>启用Timer0、Timer1、WDT溢出中断<code>INTE = C_INT_WDT | C_INT_TMR1 | C_INT_TMR0;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.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\Timer_Interrupt_WDT_Interrupt.c
<comment>启用Timer0<code>PCON1 = C_TMR0_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>全局使能所有未屏蔽的中断<code>ENI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\Timer_Interrupt_WDT_Interrupt.c
<comment>主循环<code>while(1);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>包含NY8A051F的宏定义<code>#include "ny8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>轮询RX标志位,等待数据接收完成<code>while (!(INTF3 & 0x04));
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>将接收到的数据(THR寄存器的值)输出到PORTA<code>PORTA = THR;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>设置所有PORTC为输出模式<code>IOSTC = C_PC_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>设置所有PORTB为输出模式<code>IOSTB = C_PB_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>设置所有PORTA为输出模式<code>IOSTA = C_PA_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>PORTC数据缓冲器=0x00(PC1~PC0输出低电平)<code>PORTC = (unsigned char)~(C_PC_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>PORTB数据缓冲器=0x00(PB7~PB0输出低电平)<code>PORTB = (unsigned char)~(C_PB_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>PORTA数据缓冲器=0x00(PA7~PA0输出低电平)<code>PORTA = (unsigned char)~(C_PA_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>设置PB7为输入模式<code>IOSTB = C_PB7_Input;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>初始化发送保持寄存器<code>THR = 0x00;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>启用UART RX引脚<code>SIMCR = C_RX_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>初始化波特率高位寄存器<code>DLH = 0x00;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>初始化波特率低位寄存器<code>DLL = 0x1A;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>启用奇偶校验,设置为偶校验,停止位=1,字长=8位<code>LCR = C_WL_8 | C_STOP_1 | C_Parity_En | C_Even_Parity;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>清除UART RX标志位<code>INTF3 = (unsigned char)~(C_INT_RX);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>全局禁用中断<code>DISI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_RX.c
<comment>等待接收完成<code>F_Wait_RX();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>包含NY8A051F微控制器的头文件<code>#include <ny8.h>
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>包含NY8A051F的宏定义<code>#include "ny8_constant.h"
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>清除看门狗定时器<code>CLRWDT();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>轮询TX标志位,等待数据发送完成<code>while (!(INTF3 & 0x08));
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>设置所有PORTC为输出模式<code>IOSTC = C_PC_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>设置所有PORTB为输出模式<code>IOSTB = C_PB_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>设置所有PORTA为输出模式<code>IOSTA = C_PA_Output;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>PORTC数据缓冲器=0x00(PC1~PC0输出低电平)<code>PORTC = (unsigned char)~(C_PC_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>PORTB数据缓冲器=0x00(PB7~PB0输出低电平)<code>PORTB = (unsigned char)~(C_PB_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>PORTA数据缓冲器=0x00(PA7~PA0输出低电平)<code>PORTA = (unsigned char)~(C_PA_Data);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>初始化发送保持寄存器<code>THR = 0x00;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>启用UART TX引脚<code>SIMCR = C_TX_En;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>初始化波特率高位寄存器<code>DLH = 0x00;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>初始化波特率低位寄存器<code>DLL = 0x1A;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>启用奇偶校验,设置为偶校验,停止位=1,字长=8位<code>LCR = C_WL_8 | C_STOP_1 | C_Parity_En | C_Even_Parity;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>清除UART TX标志位<code>INTF3 = (unsigned char)~(C_INT_TX);
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>全局禁用中断<code>DISI();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>将数据0x55加载到发送保持寄存器<code>THR = 0x55;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>等待发送完成<code>F_Wait_TX();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>将数据0xAA加载到发送保持寄存器<code>THR = 0xAA;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>等待发送完成<code>F_Wait_TX();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>将数据0x33加载到发送保持寄存器<code>THR = 0x33;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>等待发送完成<code>F_Wait_TX();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>将数据0xCC加载到发送保持寄存器<code>THR = 0xCC;
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>等待发送完成<code>F_Wait_TX();
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>主循环<code>while(1)
0
C:\Users\IDEA\Desktop\workplace\LiuCode
C:\Users\IDEA\Desktop\workplace\LiuCode\Liu\UART_TX.c
<comment>清除看门狗定时器<code>CLRWDT();
0