这个程序不懂,#include #define uchar unsigned char#define uint unsi
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/06/30 23:38:42
这个程序不懂,
#include
#define uchar unsigned char
#define uint unsigned int
sbit BEEP = P3^7;
uchar code DSY_CODE[]=
{
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0x00
};
uchar Pre_KeyNO = 16,KeyNO = 16;(这个不懂)
void DelayMS(uint ms)
{
uchar t;
while(ms--)
{
for(t=0;t> 4 ^ 0x0f;(这个不懂)
switch(Tmp)
{
case 1:KeyNO += 0; break;(为什么有+)
case 2:KeyNO += 4; break;
case 4:KeyNO += 8; break;
case 8:KeyNO += 12;
}
}
void Beep()
{
uchar i;
for(i=0;i
#include
#define uchar unsigned char
#define uint unsigned int
sbit BEEP = P3^7;
uchar code DSY_CODE[]=
{
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0x00
};
uchar Pre_KeyNO = 16,KeyNO = 16;(这个不懂)
void DelayMS(uint ms)
{
uchar t;
while(ms--)
{
for(t=0;t> 4 ^ 0x0f;(这个不懂)
switch(Tmp)
{
case 1:KeyNO += 0; break;(为什么有+)
case 2:KeyNO += 4; break;
case 4:KeyNO += 8; break;
case 8:KeyNO += 12;
}
}
void Beep()
{
uchar i;
for(i=0;i
![这个程序不懂,#include #define uchar unsigned char#define uint unsi](/uploads/image/z/16589852-44-2.jpg?t=%E8%BF%99%E4%B8%AA%E7%A8%8B%E5%BA%8F%E4%B8%8D%E6%87%82%2C%23include+%23define+uchar+unsigned+char%23define+uint+unsi)
脱离了硬件不太好理解,不过大体应该是
0.0问题:还有P1口,P0口分别代表什么啊!
这是最基本的,可能那你不是搞硬件的,那是单片机的IO口
1uchar Pre_KeyNO = 16,KeyNO = 16;(这个不懂)
这两个应该是来实现一个消抖的功能
2Tmp = P1 ^ 0x0f;(是检测地位有没有1吗)
逻辑与取低四位
3case 1:KeyNO += 0; break;(为什么有+)
和后面的一起表示那个按下的意思,不能单独理解
4P0 = 0x00;(这个不懂)
置零,和内部有关
5if(Pre_KeyNO != KeyNO)(不懂
消抖
6P0 = DSY_CODE[KeyNO];(不懂
表示有按键按下
7P0 = DSY_CODE[KeyNO];(不懂)
表示有按键按下
8Pre_KeyNO = KeyNO;(Pre_KeyNO,KeyNO分别是什么意思啊)
消抖的辅助工具
9 ok
0.0问题:还有P1口,P0口分别代表什么啊!
这是最基本的,可能那你不是搞硬件的,那是单片机的IO口
1uchar Pre_KeyNO = 16,KeyNO = 16;(这个不懂)
这两个应该是来实现一个消抖的功能
2Tmp = P1 ^ 0x0f;(是检测地位有没有1吗)
逻辑与取低四位
3case 1:KeyNO += 0; break;(为什么有+)
和后面的一起表示那个按下的意思,不能单独理解
4P0 = 0x00;(这个不懂)
置零,和内部有关
5if(Pre_KeyNO != KeyNO)(不懂
消抖
6P0 = DSY_CODE[KeyNO];(不懂
表示有按键按下
7P0 = DSY_CODE[KeyNO];(不懂)
表示有按键按下
8Pre_KeyNO = KeyNO;(Pre_KeyNO,KeyNO分别是什么意思啊)
消抖的辅助工具
9 ok
英语翻译#include#include#define uchar unsigned char#define uint
ds18b20测温#include#include#define uchar unsigned char#define
51单片机 定时器#include#define uint unsigned int uint pp;sbit led=
#include #include #define MAXLINE 1000int getline(char *line
括号匹配检验程序#include#include#define TRUE 1#define FALSE 0#define
typedef unsigned char byte; typedef unsigned char uchar; typ
C语言 中&和 请参照这个程序#include#define NULL 0struct student{int num;
#include #include #include #include #include /* define
#include #include #define TRUE 1 #define FALSE 0 #define OK
计算圆的面积和周长帮忙看看这个程序有什么错误.#include#include#define r 3int main()
邻接矩阵表示图及遍历修改程序#include#define INT_MAX 1000#define MaxVertice
注释下面代码,#include #include #define N 10void sort (char *pstr[N