SST89C58电子盘电路及代码

[05-23 02:47:29]   来源:http://www.88dzw.com  单片机电路图   阅读:8300

文章摘要: acall Read_Sctr acall Compare jb F0, fail clr P1.4 ; indicates successful operations. setb P1.5 sjmp $fail: clr P1.5 ; flags failed comaprison. setb P1.4 sjmp $;Function: acall Busy

SST89C58电子盘电路及代码,标签:电路图讲解,电路图练习,http://www.88dzw.com

        acall Read_Sctr

        acall Compare

        jb      F0, fail

        clr     P1.4              ; indicates successful operations.
        setb  P1.5
        sjmp  $

fail:                clr     P1.5              ; flags failed comaprison.
        setb  P1.4
        sjmp  $
;========================================

Function:    acall  Busy

        mov  dptr, #Sectr_Cnt
        mov  a, R2                    ; R2 is Sector Count
        movx @dptr, a
        
        mov  dptr, #Sectr_No
        mov  a, R3                ; R3 contains LBA0:7
        movx @dptr, a

        mov  dptr, #Cylinder_Low
        mov  a, R4                ; R4 contains LBA8:15
        movx @dptr, a

        mov  dptr, #Cylinder_Hi
        mov  a, R5                 ; R5 contains LBA16:23
        movx @dptr, a

        mov  dptr, #Drv_Head
        mov  a, R6                 ; R6 contains LBA24:27
        anl    a,    #00001111b
        orl     a,    #11100000b   ; bit4=0 as MASTER, 1 as Slave; bit6=1, enable LBA.
        movx @dptr, a
    
        mov  dptr, #command
        mov  a, R7                     ; R7 is command code.

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


Tag:单片机电路图电路图讲解,电路图练习电子电路图 - 单片机电路图