main.c
来自「软件简介:HI-TECH PICC 是一款高效的C编译器」· C语言 代码 · 共 19 行
C
19 行
#include <stdio.h>
#include <htc.h>
/* A simple demonstration of serial communications which
* uses the bit-banging implementation of a serial communications.
* Useful for PIC16Cxxx series of devices, or if USART is already
* in use. */
void main(void){
unsigned char input;
INTCON=0; // purpose of disabling the interrupts.
printf("\rPress a key and I will echo it back:\n");
while(1){
input = getch(); // read a response from the user
printf("\rI detected [%c]",input); // echo it back
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?