Steward
分享是一種喜悅、更是一種幸福
微處理器 - Lattice GAL22V10 - C/C++ - Button
參考資訊:
https://www.stcmicro.com/datasheet/STC15F204EA-cn.pdf
https://www.stcmicro.com/datasheet/STC15F2K60S2-en.pdf
Register


P5.5

main.c
#include <mcs51/8051.h>
__sbit __at (0xCD) P5_5;
#define LED P1_2
#define BTN P5_5
int main(void)
{
while (1) {
LED = BTN;
}
return 0;
}
完成
