欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    单片机计时秒表程序方案设计书.pdf

    • 资源ID:56682067       资源大小:49.56KB        全文页数:14页
    • 资源格式: PDF        下载积分:4.3金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要4.3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    单片机计时秒表程序方案设计书.pdf

    pic 单片机计时秒表程序设计(时钟显示范围00.0099.99 秒,分辨度为0.01 秒)作者:来源:本站原创点击数:1676 更新时间:2008 年 07 月 12 日/此程序实现计时秒表功能,时钟显示范围00.0099.99 秒,分辨度:0.01 秒#include p18f458.hunsigned char s4。/定义 0.01 秒、0.1 秒、1 秒、10秒计时器unsigned char k,data,sreg。unsigned int i。const table11=0 xc0,0 xf9,0 xa4,0 xb0,0 x99,0 x92,0 x82,0XD8,0 x80,0 x90。/不带小数点的显示段码表const table010=0X40,0X79,0X24,0X30,0X19,0X12,0X02,0X78,0X00,0X10。/带小数点的显示段码表void clkint(void)。/TMR0 初始化子程序void tmint()T0CON=0XCF。/设定 TMR0L 工作于 8 位定时器方式/内部时钟,TMR0 不用分频INTCON=0X20。/总中断禁止,TMR0 中断允许,清除TMR0 的中断标志INTCON2bits.TMR0IP=1。/TMR0 中断高优先级RCONbits.IPEN=1。/使能中断优先级/系统其它部分初始化子程序void initial()TRISA=0 x00。/A 口设置为输出TRISB=0XF0。/RB1 输出,RB4 输入TRISC=0 x00。/SDO 引脚为输出,SCK 引脚为输出TRISE=0 x00。/E 口设置为输出SSPCON1=0 x30。/SSPEN=1。CKP=1,FOSC/4 SSPSTAT=0 xC0。/时钟下降沿发送数据PIR1=0。/清除 SSPIF标志data=0X00。/待显示的寄存器赋初值PORTBbits.RB1=0。PORTAbits.RA3=0。PORTE=0。/将 K1,K2,K3,K4 四条列线置0 /SPI 传输数据子程序void SPILED(char data)SSPBUF=data。/启动发送do 。while(PIR1bits.SSPIF=0)。PIR1bits.SSPIF=0。/显示子程序,显示4 位数void dispaly()PORTAbits.RA5=0。/准备锁存for(k=0。k4。k+)data=sk。if(k=2)data=table0data。/个位需要显示小数点else data=tabledata。SPILED(data)。/发送显示段码 for(k=0。k4。k+)data=0 xFF。SPILED(data)。/连续发送4 个 DARK,使显示好看一些文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5 PORTAbits.RA5=1。/最后给锁存信号,代表显示任务完成/软件延时子程序void DELAY()for(i=3553。-i。)continue。/键扫描子程序void KEYSCAN()while(1)dispaly()。/调用一次显示子程序while(PORTBbits.RB4=0)DELAY()。/若有键按下,则软件延时break。if(PORTBbits.RB4=0)break。/若还有键按下,则终止循环扫描,返回/等键松开子程序void keyrelax()while(1)dispaly()。/调用一次显示子程序if(PORTBbits.RB4=1)break。/为防止按键过于灵敏,每次等键松开才返回 /*高优先级中断向量*/文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5#pragma code InterruptVectorHigh=0 x08 void InterruptVectorHigh(void)_asm goto clkint/跳到中断程序_endasm/中断服务程序#pragma code#pragma interrupt clkint void clkint()TMR0=0X13。/对 TMR0 写入一个调整值。因为写入TMR0 后接着的/两个周期不能增量,中断需要3 个周期的响应时间,/以及 C语言自动进行现场保护要消耗周期INTCONbits.T0IF=0。/清除中断标志sreg=sreg+1。/中断计数器加1 if(sreg=40)/中断次数为40 后,才对S0,S1,S2,S3 操作 sreg=0。s0=s0+1。if(s0=10)s0=0。s1=s1+1。if(s1=10)s1=0。s2=s2+1。if(s2=10)s2=0。s3=s3+1。if(s3=10)s3=0。文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5 /主程序/http:/ 提供此单片机程序有问题请联系main()tmint()。/TMR0 初始化initial()。/spi 显示初始化及系统其它部分初始化INTCONbits.GIE=0。/总中断禁止while(1)for(k=0。k4。k+)sk=0。sreg=0。/赋显示初值dispaly()。/调用一次显示子程序KEYSCAN()。/键扫描,直到开始键按下keyrelax()。/等键松开INTCONbits.GIE=1。/总中断允许KEYSCAN()。/键扫描直到停止键按下,在键扫描时有显示keyrelax()。/等键松开INTCONbits.GIE=0。/总中断禁止KEYSCAN()。/键扫描到清0键按下,在键扫描时有显示keyrelax()。/等键松开-汇编语言版本的pic 单片机计时秒表程序设计-。此程序实现计时秒表功能。时钟显示范围:00.00秒-99.99 秒,分辨度:0.01 秒。通过按键来启动计时、停止计时及清0。即第一次按下任意键开始计时,第二次按下任意键停止计时。第三次按下任意键使LED文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5清 0,等待下一次计时开始LIST P=18F458 INCLUDE P18F458.INCS0 EQU 0X20。0.01 秒计时器S1 EQU S0+1。0.1 秒计时器S2 EQU S0+2。1 秒计时器S3 EQU S0+3。10 秒计时器SREG EQU S0+4。软计数器LEDF EQU S0+5。显示的LED 的位置指示寄存器XW_TEMP EQU S0+6。用于中断中保护W 的值XHOSTS EQU S0+7。用于中断中保护STATUS 的值DEYH EQU S0+8 DEYL EQU S0+9。以上两个寄存器用于软件延时HOSTF EQU S0+0A。用于中断中保护FSR0L 的值TEMP EQU S0+0B。用于存放临时值ORG 0X00 GOTO MAIN ORG 0X08 GOTO CLKINT。转向中断服务程序ORG 0X30。数字到段码的转换子程序(最好放在程序开头,避免超过2K 的空间发生跨页读表)。*不带小数点的共阳极码表*CONVERT ADDWF PCL,1 RETLW 0XC0。0,显示段码与具体的硬件连接有关RETLW 0XF9。1 RETLW 0XA4。2 RETLW 0XB0。3 RETLW 0X99。4 RETLW 0X92。5 RETLW 0X82。6 RETLW 0XD8。7 RETLW 0X80。8 文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5RETLW 0X90。9 RETLW 0X88。A RETLW 0X83。B RETLW 0XC6。C RETLW 0XA1。D RETLW 0X86。E RETLW 0X8E。F RETLW 0X7F。.RETLW 0XBF。-RETLW 0X89。H RETLW 0XFF。DARK RETURN。*带小数点的共阳极码表*CONVERT2 ADDWF PCL,1 RETLW 0X40。0 RETLW 0X79。1 RETLW 0X24。2 RETLW 0X30。3 RETLW 0X19。4 RETLW 0X12。5 RETLW 0X02。6 RETLW 0X78。7 RETLW 0X00。8 RETLW 0X10。9 RETURN。*SPI发送显示子模块*TRANSMIT CLRF PORTA。LACK 送低电平,为锁存做准备MOVWF SSPBUF。启动发送WAIT NOP BTFSS PIR1,SSPIF GOTO WAIT。等待发送结束BCF PIR1,SSPIF。清除中断标志文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3B1 ZZ4K9U2A10N5文档编码:CF2X2N5Y9I2 HQ5C5X8T3

    注意事项

    本文(单片机计时秒表程序方案设计书.pdf)为本站会员(H****o)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开