用心讨教问题,看了不要路过呀,进来看看#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar segment[]={0xc0,0Xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff,0x89,0xc7}; //数码管的段选
uchar display_temp[4]={0,0,0,0}; //用来装显示数据的空数组
uchar digit_select_line[]={0xef,0xdf,0xbf,0x7f};
uint time_count;
uint carry_count,pulse_count;
uchar flag;
sbit shurua = P2^0; //输入端A
sbit shurub = P2^1; //输入端B
sbit shuchu= P2^2; //输出段
求:
如果shurua和shurub都没有输入信号(0)时,shuchu无输出(0),
当shurua为1时,shuchu输出1,三秒后shurub没有输入1,则shuchu关闭输出(0)
只有当shurua和shurub在三秒前都有输入(1)时,shuchu输出(1)
南来的,北往的,哥哥,姐姐,都来帮帮俺吧,
给你洗脚了,
[
本帖最后由 用心思考 于 2012-5-28 06:21 编辑 ]