您当前的位置:五五电子网电子知识单片机-工控设备PIC单片机pic16f84 LED频率计 正文
pic16f84 LED频率计

pic16f84 LED频率计

点击数:7751 次   录入时间:03-04 11:38:25   整理:http://www.55dianzi.com   PIC单片机
;| Total timing formula:                                                  |
;|                                                                        |
;| N = 25 000 * Fx = 60*[7*(36 + 3*T1) + 6 + 3*T2] + 12 + 3*T3 + Z         |
;|                                                                        |
;| where T1,T2,T3 are initial values of timing loops,                     |
;|       Z        are additional tunig NOPs,                              |
;|       Fx       Xtal frequency in MHz.                                  |
;|                                                                        |
;|------------------------------------------------------------------------|
;| Some ideas were taken from "Simple low-cost digital frequency meter    |
;|                             using a PIC 16C54" (frqmeter.asm)          |
;|                             written by James Hutchby, MadLab Ltd. 1996 |
;|------------------------------------------------------------------------|
;|                                                                        |
;| This software is free for private usage. It was created for HAM radio  |
;| community members. Commercial exploatation is allowed only with        |
;| permission of authors.                                                 |
;|                                                                        |
;|------------------------------------------------------------------------|

;       include <p16c84.inc>
       include <p16f84.inc>

;--------------------------------------------------------------------------

Index       equ         0Ch         ; dummy register
Count       equ         0Dh         ; inkremental register
Help        equ         0Eh         ; dummy register

LED0        equ         0Fh
LED1        equ        010h
LED2        equ        011h
LED3        equ        012h
LED4        equ        013h
LED5        equ        014h
LED6        equ        015h
LED7        equ        016h

TimerH      equ        017h         ; higher byte of SW counter

LowB        equ        018h         ; low byte of resuLTEd frequency
MidB        equ        019h         ; middle byte of resulted frequency
HigB        equ        01Ah         ; high byte of resulted frequency

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]  下一页


本文关键字:暂无联系方式PIC单片机单片机-工控设备 - PIC单片机