求一段 单片机计数|中断程序

[复制链接]
查看11 | 回复1 | 2011-11-6 14:05:13 | 显示全部楼层 |阅读模式
#include//52单片机头文件#include //包含有左右循环移位子函数的库#define uint unsigned int
//宏定义#define uchar unsigned char//宏定义sbit beep=P2^3;uchar tt;uint fre,flag;void main()
//主函数{fre=50000;beep=0;TMOD=0x11;//设置定时器0,定时器1为工作方式1TH0=(65536-fre)/256;TL0=(65536-fre)%256;TH1=(65536-50000)/2...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行