大香蕉大香蕉在线播放-日韩av在线一区中文字幕-日韩熟女熟妇久久精品综合-精品免费视频一区二区三区

技術(shù)熱線: 4007-888-234

專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

提供開發(fā)工具、應(yīng)用測試 完善的開發(fā)代碼案例庫分享

從全面的產(chǎn)品導(dǎo)入到強(qiáng)大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無限潛能!

技術(shù)支持

一款用F84做的測頻儀

更新時間: 2019-03-23

十年專注單片機(jī)方案開發(fā)的方案公司英銳恩,分享一款用F84做的測頻儀。英銳恩現(xiàn)提供服務(wù)產(chǎn)品涉及主控芯片:8位單片機(jī)、16位單片機(jī)、32位單片機(jī)及各類運(yùn)算放大器等。

;*******************************************************************
;
;        Frequency display
;        Crystal freq. 4.000MHz +/- a bit
;
;*******************************************************************
;
;        FM000.TXT Originally from FM3/4 9:39pm 14 May 2002
;        As implemented in experimental 3.5MHz receiver
;
;*******************************************************************
;
;        FM003        Fixed? major silliness in LO-IF code
;                Re-wrote USB/LSB suffix code
;                Added #defines for crook displays
;                Added #defines for two line displays
;                Wrapped #ifdef ... endif around debugging code
;
;*******************************************************************

;#define        testing                1        ; Comment out when testing finished

;#define        Bad_Display        1        ; Un-comment for "stop at 8" displays

;#define        Two_Line        1        ; Un-comment for two line displays

;*******************************************************************
;
;        CPU configuration
;        It's a 16F84, HS oscillator,
;        watchdog timer off, power-up timer on
;

        processor        16f84
        include               
        __config        _HS_OSC & _PWRTE_ON & _WDT_OFF


#define S_out        PORTA,0x00        ; 9600 baud serial out

#define        PUFF        PORTA,0x00        ; Future stabiliser
#define        HUFF        PORTA,0x01        ; Ditto.
#define        ENA        PORTA,0x02        ; Display "E"
#define        RS        PORTA,0x03        ; Display "RS"
#define PORTA4        PORTA,0x04        ; From LS393 divider chip

#define RESET        PORTB,0x01        ; Pin  7, Counter RESET
#define        UP_CNT        PORTB,0x02        ; Pin  8, Counter FLUSH
#define GATE        PORTB,0x03        ; Pin  9, Counter GATE
#define        Store        PORTB,0x04        ; Pin 10, 0 = Measure BFO
#define        Add_LO        PORTB,0x05        ; Pin 11, 0 = RF := LO + IF
                                ;         1 = RF := | LO + (-IF) |
#define        BFO_Lo        PORTB,0x06        ; Pin 12, 0 = BFO on lower freq.
#define        BFO_Hi        PORTB,0x07        ; Pin 13, 0 = BFO on higher freq.

#define        LOK_FLG        FLAGS,0x06
#define        Prg_FLG        FLAGS,0x05
#define        Ovr_Rng        FLAGS,0x04
#define        AMflag        FLAGS,0x03        ; 0 = Don't print USB/LSB suffix

#define BANKSEL        STATUS,RP0

#define        beq        bz                ; Motorola syntax branches
#define        BEQ        bz
#define        BNE        bnz
#define        bne        bnz

#define        BCC        bnc
#define        bcc        bnc
#define        BCS        bc
#define        bcs        bc

#define        BRA        goto
#define        bra        goto

;*******************************************************************
;
;        file register declarations: use only registers in bank0
;        bank 0 file registers begin at 0x0c in the 16F84
;
;*******************************************************************

        cblock 0x0c

        COUNT                        ; Bin to BCD convert (bit count)
        TEMP
        cnt                        ;                    (BCD BYTES)

        COUNT1                        ; Used by delay routines
                                ; and "prescaler flush"
        COUNT2                        ; Timing (100ms)

 COUNT3                        ; Timing (100ms)
        COUNT4                        ; Timing (400ms)


        CHR

        AccA:3                        ; Binary, MSB first
       
        AccB:3                        ; Intermediate frequency
       
        bcd:4                        ; BCD, MSD first 

 FLAGS

        SBflag                        ; 0 = Lower BFO frequency
                                ; 1 = Higher

        W_TEMP                        ; W saved here by ISR
        STATUS_TEMP                ; Status Register saved here by ISR
       
        dbg0:3                        ; Debugging stuff
        dbg1:3
        dbg2:3
        dbg3:3
        dbg4:3
        dbg5:3

        S_Wtemp                        ; "debug" Variables
        S_count
        D_Wtemp
        D_Stemp
        D_FSR
        D_hex
       
        endc

;**********************************************************
;
;        Begin Executable Stuff(tm)
;

        org        0

GO        clrwdt                        ; 0 << Reset
        call        InitIO                ; 1    INITIALISE PORTS

  CLRF        PORTA                ; 2
        goto        START                ; 3

INTRUPT        goto        ISR                ; 4 << Interrupt

;**********************************************************
;
;        Text Strings (stored in RETLWs)
;

mhz        dt        " MHz ",0
Spaces        dt        "   ",0
USB        dt        "USB",0
LSB        dt        "LSB",0
Prog        dt        "PRG",0

adv1        dt        "DFM 3.0 ",0
adv2        dt        "- VK3BHR",0

ovr1        dt        "   Over ",0
ovr2        dt        "Range   ",0

#ifdef        Two_Line

adv3        dt        "1234567890ABCDEF",0

endif


;**********************************************************
;
;        Main Program
;

START        CLRF        PORTB

#ifdef        testing
        bsf        PUFF
endif

        CALL        LCDINIT                 ; INITIALIZE LCD MODULE       

        MOVLW        adv1                ; Sign on
        call        pmsg

#ifdef        Bad_Display
        CALL        LINE2
endif

        movlw        adv2
        call        pmsg
       
        MOVLW        0x28                ; Delay for 4 sec.       
        CALL        DECI
        CALL        CLEAR

tx_1        decfsz        S_count,f        ; Done all bits?
        goto        put_clp

        movlw        0xE7                ; Delay for last data
txd_1        addlw        0x01
        bne        txd_1

        bsf        S_out                ; Transmit two stop bit

        movlw        0xCD
txd_9        addlw        0x01
        bne        txd_9
       
        return

endif

;********************************************************************
;        Tail End Charlie
;********************************************************************       
        END

404
返回首頁 |  返回上一頁
粗大长内射女人视频| 亚洲欧美日韩清纯唯美第一区| 狠狠干无码日韩AV| 欧美 日韩 国产 自拍| 美女大鸡操很多水在线看| 大鸡吧老外操中国逼| 高清无码精品一区二区三区| 天堂丝袜人妻中文字幕在线| 日韩 欧美 成人 免费| 日韩午夜精品中文字幕| 男人大鸡巴操女人的大逼| 久久99热人妻偷产精品| 丰满少妇被强入在线观看| 大胸美女被c的嗷嗷叫视频| 91精品欧美久久久久久| 亚欧日韩国产在线| 免费人成再在线观看| 欧美国产综合日韩一区二区| 女教师色色天天免费播放| 操逼啊 啊 啊黄色视频| 嗯啊好大好想要视频| 怎么样操女人的逼亚洲Av黄片段| 香蕉国产精品偷在线| 久久精品男人的天堂av| 日本一二区视频在线观看| 大香蕉大香蕉大香蕉大香| 三级片手机在线视频| 91孕妇精品一区二区三区| 国产午夜爽爽爽男女免费动漫AV | 国产在线中文字幕一区二区三区| 欧美大鸡巴操穴日韩| 中文字幕一区二区 在线| 极品 操 抽插视频| 五月天亚洲激情综合av| 操俄罗斯美女bb| av中文字幕一区二区精品久久| 亚洲人成在线不卡网| 免费的黄片很很操| A级毛片高清视频| 免费人成再在线观看| 无码社区在线观看|