电工吧
◎ 电工吧 >> 设为首页 >> 加入收藏>> 联系方式 >> 投稿 >>留言 
网站首页 · 电工新闻 · 电工基础 · 电力技术 · 电子技术 · 电工图片 · 电工法规 · 电工图书 · 电工搜索 · 论坛交流
 
      最新电子论文
 · 开关电源设计知识介绍(中 
 · 印制电路板设计原则和抗干 
 · 电路设计常用软件介绍 
 · 各种滤波电路的比较 
 · 激光头维修的简便方法 
 · 回扫线现象全面剖析 
 · 线性NTC温度传感器使用指南 
 · 变压器的基本知识 
      推荐电子论文

 · 单片机初学者编程最简练的指导
 · 电力行业蓄电池容量测试方案
 · 定点dsp与浮点dsp的比较
 · 永不消逝的电波
 · 分时操作系统思想在单片机编程
 · PC机打印口与便携式数据采集系
 · 单线数字温度传感器的原理与应
 · 一个单片机串行数据采集,传输
 · PLD应用的方方面面
 · 一种纸币识别系统的设计

  ■ 所在位置:首页>>电子技术>>电子应用>>正文
 

PIC16F87A的二位动态显示程序

pcl equ 02h
status equ 03h
porta equ 05h
portc equ 07h
trisa equ 85h
trisc equ 87h
adcon1 equ 09fh
count1 equ 20h
count2 equ 21h
count3 equ 22h
t1  equ 23h
t2  equ 24h
 org 000h

main
  bsf status,5
  bcf status,6
  movlw 06h
  movwf adcon1
  movlw 00h
  movwf trisa
  movwf trisc
  bcf status,5
  movlw 0ffh
  movwf portc
ini_0
  clrf count1
  clrf count2
  clrf count3
disp1
  movlw 0ffh
  movwf count1
disp
  movlw 0ffh
  movwf porta
  movfw count2
  call convert
  movwf portc
  movlw 0feh
  movwf porta
  call delay
  movfw count3
  call convert
  movwf portc
  movlw 0fdh
  movwf porta
  call delay
  decfsz count1,1
  call disp
ini_1
  bsf status,0
  incf count2,1
  movlw 0ah
  subwf count2,0
  btfss status,0
  goto disp1
  movlw 0h
  movwf count2
  incf count3,1
  movlw 0ah
  subwf count3,0
  btfss status,0
  goto disp1
  call ini_0
delay
    movlw 6
    movwf t1
l2 movlw .255
   movwf t2
l3 decfsz t2,1
   goto  l3
   decfsz t1,1
   goto l2
  retlw  0
convert
  addwf pcl,1
table
  retlw 0c0h
  retlw 0f9h
  retlw 0a4h
  retlw 0b0h
  retlw 99h
  retlw 92h
  retlw 82h
  retlw 0f8h
  retlw 80h
  retlw 98h
  retlw 7fh
  end

 
         相关文章

·
·
·
·
·
·

 
 
  关于本站 | 友情站点 | 联系方式 | 版权声明 | 电工技术服务与支持中心
Copyright© 2005-2006 Dg8.Com.CN ,All Rights Reserved
电工网 电工吧 电子吧