https://github.com/huangcongqing/microcontrollers-c
C framework for different microcontrollers用C语言写的单片机程序
https://github.com/huangcongqing/microcontrollers-c
c microcontroller
Last synced: about 1 year ago
JSON representation
C framework for different microcontrollers用C语言写的单片机程序
- Host: GitHub
- URL: https://github.com/huangcongqing/microcontrollers-c
- Owner: HuangCongQing
- Created: 2017-10-18T13:43:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-12T10:32:25.000Z (over 6 years ago)
- Last Synced: 2024-10-13T13:12:06.030Z (over 1 year ago)
- Topics: c, microcontroller
- Language: C
- Size: 5.32 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microcontrollers-C
C framework for different microcontrollers用C语言写的单片机程序
51单片机开发板视频:
链接:https://pan.baidu.com/s/10fTTaxYWiL2rO-KiOEtndw
提取码:toid
复制这段内容后打开百度网盘手机App,操作更方便哦
# 流水灯
## sbit 变量名=地址值; 在给某个引脚取名的时候经常会用到。
## typedef使用
`typedef unsigned char u8;`
`typedef unsigned int u16;(后面要加分号)`
## define使用
`define A P0(注意后面不用加分号)`
# 蜂鸣器
* I/O端口默认都是高电平
## 数码管(静态,动态)
* 位选,3-8译码器
```
sbit LSA=P2^2; //三八译码器
sbit LSB=P2^3;
sbit LSC=P2^4;
```

## 独立按键
* P3^1,P是大写
* 消除抖动 一般大约10ms
### 相关图片





选取上拉电阻4.7K-10K
