main.c
来自「microcontroller documents 8051 atmel con」· C语言 代码 · 共 26 行
C
26 行
sfr P1 = 0x90; /* SFR for P1 */
sbit P1_0 = P1^0; /* SFR for P1.0 */
sbit P1_1 = P1^1; /* SFR for P1.1 */
/*------------------------------------------------
MAIN C function
------------------------------------------------*/
void main (void)
{
P1_0; /* Set P1.0 as an input */
/*--------------------------------------
Use the Toolbox buttons in the debugger
to set and clear P1.0. Open the Port1
dialog from the Peripherals Menu to view
the status of P1.1.
--------------------------------------*/
while (1)
{
P1_1 = P1_0; /* Read P1.0 & Write to P1.1 */
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?