亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? icd仿真器的源程序.txt

?? 包括很多單片機開發用的元代碼
?? TXT
?? 第 1 頁 / 共 3 頁
字號:

movlw 2 ; Do the Program Instruction
call CmdWRITE

movlw 8 ; Start the Programming
call CmdSEND

HCPPL_VerifySkip

movf NextRX, w ; Now, Wait through the Next Character for Programming
addlw 2
call RXBufReset
movwf CmdReady

HCPPL_Cycle12Wait ; Wait for the Two Cycles To End
movf NextRX, w
subwf CmdReady, w
btfss STATUS, Z
goto HCPPL_Cycle12Wait

HCPPL_Cycle3 ; Have Waited for the Data to Take

btfsc Verify
goto HCPPL_Cycle3Do ; Don't End Programming if Verify Set

btfss FlashEPROM
goto HCPPL_Cycle3Do ; Flash, Don't have to Stop Programming

movlw 0x00E ; EEPROM - Send End Programming Command
call CmdSEND

HCPPL_Cycle3Do ; Now, See if the Instruction was Entered

movlw 4
call CmdREAD

bcf STATUS, C ; Compare the Values to Written
rrf PData + 1, w
xorwf TData + 1, w
btfss STATUS, Z ; If NOT Zero, then MisCompare
goto HC_Error
rrf PData, w ; Carry Flag Still Valid
xorwf TData, w
btfss STATUS, Z
goto HC_Error ; MisCompare Somewhere

movlw 6 ; Increment the PIC's Internal PC
call CmdSEND

incf PC ; Increment the Program Counter
btfsc STATUS, Z
incf PC + 1

movf NextRX, w ; Wait for the Cycle to End (and Restart)
movwf CmdReady

HCPPL_Cycle3Wait ; Wait for the Next Character
movf CmdReady, w
subwf NextRX, w
btfsc STATUS, Z
goto HCPPL_Cycle3Wait

decfsz LineCount
goto HCP_ProgramLoop ; Now, Get the Next Character

movf NextRX, w ; Reset Where we Are
movwf NextINS

addlw 0x0FF ; #### - Check Back by 1
andlw RXBuf + 7
iorlw RXBuf

; xorlw RXBuf ; Are we at the Start of the Buffer?
; movlw 0x0FF
; btfsc STATUS, Z
; movlw RXBufEnd - RXBuf ; Move the Buffer Back By 1
; addwf NextINS, w

movwf FSR

movf INDF, w ; Do we Have a Character Match?
xorlw ':'
btfss STATUS, Z
goto HCP_Loop ; No, Stick With Current

movf FSR, w ; Yes, Pass to the Program
movwf NextINS

goto HCP_Loop ; Check out the Next Line

HC_Error ; Error - Display and Return

call DownLoadWait 

movlw 1 ; Start a New Line
call DispMSG

movlw 6 ; Put in Error - Message
call DispMSG

movf PC + 1, w
call DispHEX
movf PC, w
call DispHEX

movlw ' ' ; Put In the Data As Well
call SendCHAR
movlw 'A' ; Show the Actual Value
call SendCHAR
movlw '-'
call SendCHAR
movf PData + 1, w
call DispHEX
movf PData, w
call DispHEX

movlw ' ' ; Show the Expected
call SendCHAR
movlw 'E'
call SendCHAR
movlw '-'
call SendCHAR
movf TData + 1, w
call DispHEX
movf TData, w
call DispHEX

bsf CurError ; Setup so that Last Error Get's Set correctly

goto HCP_End

HCP_Finished ; Wait for the Last 0x00A

clrf TData ; Do a Maximum Delay (1/10 Second)
clrf TData + 1

HCP_FinishedLoop ; Loop Here Until get 0x00A or TimeOut

movlw 1 ; Timeout Check Loop
addwf TData
decfsz TData + 1
goto HCP_FinishedSkip
goto HCP_End
HCP_FinishedSkip

movf NextINS, w
subwf NextRX, w ; Look for the Next Character
btfsc STATUS, Z
goto HCP_FinishedLoop

movf NextINS, w ; Look at the Value at NextINS
movwf FSR

movf NextRX, w ; Setup the Point to the Next Character
movwf NextINS

movlw 0x00A ; Do we Have the Last 0x00A?
xorwf INDF, w
btfss STATUS, Z
goto HCP_FinishedLoop

HCP_End ; Finished Programming - Reset the Power and End

movlw 1 ; End the Current Line
call DispMSG

call Poweroff ; Turn off the Power & RB6/RB7 Drivers

goto Prompt


HC_NotProgram ; Not Program, Check for Verify

xorlw 'P' ^ 'V' ; Do we Have a Verify Instruction?
btfss STATUS, Z
goto HC_Invalid
HC_Verify

bsf Verify ; Set the Verify Flag

clrf PC + 1 ; Clear the PIC's PC
clrf PC

goto HCP_Start ; Use the Programmer's Code for Verifying


HC_Invalid

movlw 3 ; Put in "Invalid Message"
call DispMSG

goto Prompt


PAGE
; Subroutines
DownLoadWait ; Wait for the DownLoad to Complete

movf NextRX, w ; Make Sure the Next Instruction to be Read is the Same as the
movwf NextINS ; Current...

movlw 5 ; Add 5 to RTCHI to Get the End Condition
addwf RTCHI, w
movwf Temp ; Use this as a Compare for the Wait

DLW_Loop ; Loop Around Here until a New Character OR 1 Second

movf NextRX, w ; Do we Have a New Character in from the Serial Port?
subwf NextINS, w
btfss STATUS, Z
goto DownLoadWait ; Yes, Wait through the Next Character

movf Temp, w ; Have we waited 1 Sec from the Previous Character?
subwf RTCHI, w
btfss STATUS, Z
goto DLW_Loop ; Nope, Keep Looping Around

return


BlankCheck ; Check to See if the EPROM Device is Blank

call PowerON ; Turn On Power & Enable RB6/RB7 Drivers

movlw 5 ; Put in "Blank" Message - Wait for Vpp to Stabilize
call DispMSG
btfsc TXStart ; Wait for the Previous Send to End
goto $ - 1

clrf PC + 1 ; Clear the Program Counter Values
clrf PC

BC_Loop ; Loop Around Here and Read Each Location

movlw 4 ; Read the Current Location
call CmdREAD

movlw 0x07F ; Check the Values Returned
xorwf PData + 1, w
btfss STATUS, Z
goto BC_Error ; MisCompare
movlw 0x0FE
xorwf PData, w
btfss STATUS, Z
goto BC_Error

movlw 6 ; Value is Okay
call CmdSEND ; Increment the PIC's PC

incf PC ; Increment the Program Counter
btfsc STATUS, Z
incf PC + 1

movlw 4 ; Have we Checked all the Values?
subwf PC + 1, w
btfss STATUS, Z ; If Zero, Have to Move Into Configuration Memory
goto BC_Skip

movlw 0x020 ; Now, Do the Configuration Memory Starting @ 0x02000
movwf PC + 1
clrf PC

movlw 0 ; Get the Configuration Value
call CmdWRITE

BC_Skip ; Now, See if We're at the End

movlw 0x020 ; In Configuration Memory?
xorwf PC + 1, w
btfss STATUS, Z
goto BC_Loop ; Nope...
movlw 0x010 ; Past the End of Configuration Memory?
xorwf PC, w
btfss STATUS, Z
goto BC_Loop

clrf Command ; Note that BlankCheck Was Successful

goto BC_End ; Finished, Turn Off the PIC Power

BC_Error ; Error, Print the Hex Address of the Non-Zero

movf PC + 1, w
call DispHEX
movf PC, w
call DispHEX

movlw '-' ; Put In the Data As Well
call SendCHAR

movf PData + 1, w
call DispHEX
movf PData, w
call DispHEX

movlw 1 ; Mark that we have the Error
movwf Command

BC_End ; Finished Doing the Blank Check

call Poweroff

return ; Return to the Caller


PowerON ; Turn on Power & Enable RB6/RB7 Drivers

movlw 0x0CF ; Make Sure the Values are Low
andwf PORTB

bsf STATUS, RP0 ; Turn On the Output Bits
movlw 0x0CF ; RB4 and RB5 for RB6 & RB7
andwf TRISB & 0x07F
bcf STATUS, RP0

bsf PORTA, 0 ; Turn On U2's Power

movlw 1 ; Start a New Line - Wait for Power and Output to Stabilize
call DispMSG

bsf PORTB, 1 ; Turn On U2's Vpp

return


Poweroff ; Turn off the Power and RB6/RB7 Drivers

bsf STATUS, RP0 ; Turn On the Output Bits
movlw 0x030 ; RB4 and RB5 for RB6 & RB7
iorwf TRISB & 0x07F
bcf STATUS, RP0

bcf PORTB, 1 ; Turn off U2's Vpp
bcf PORTA, 0 ; Turn off U2's Power

return


CmdSEND ; Send the Command to U2

movwf CSTemp ; Save the Command for Sending

movlw 6 ; Only Sending 6 Characters
movwf CCount

bcf INTCON, GIE

CS_Loop ; Loop Around Here for Each Bit

bsf PORTB, 4 ; Make the Clock High

bcf PORTB, 5 ; Start with the Data Low
btfsc CSTemp, 0 ; Do we Set the Value High?
bsf PORTB, 5

bcf PORTB, 4 ; Finished with the Data

nop ; Put Here to Make Sure Timing is Equal
rrf CSTemp ; Move Next Bit to Position "0"

decfsz CCount ; Do 6x
goto CS_Loop

bcf PORTB, 5 ; Make Sure RB7 Is Low Upon Return

bsf INTCON, GIE

return 


CmdWRITE ; Write Data to the PIC

call CmdSEND ; Assume Leading Character is in "w"

goto $ + 1 ; Match Cycles with the Read
nop

movlw 16 ; Can Send Data - Takes 16 Cycles
movwf CCount

bcf INTCON, GIE

CW_Loop

bsf PORTB, 4 ; Make the Clock High

bcf PORTB, 5 ; Start with the Data Low
btfsc PData, 0 ; Do we Set the Value High?
bsf PORTB, 5

bcf PORTB, 4 ; Finished with the Data

rrf PData + 1 ; Shift Over the Data
rrf PData

decfsz CCount ; Do 6x
goto CW_Loop

bcf PORTB, 5 ; Make Sure Everything is Low Upon Exit

bsf INTCON, GIE

return


CmdREAD ; Read Data from the PIC

call CmdSEND ; Assume Leading Character is in "w"

bsf STATUS, RP0 ; Make RB7 an Input Bit
bsf TRISB & 0x07F, 5
bcf STATUS, RP0

movlw 16 ; Can Send Data - Takes 16 Cycles
movwf CCount

bcf INTCON, GIE

CR_Loop

bsf PORTB, 4 ; Make the Clock High

bcf STATUS, C ; Get Read Value
btfsc PORTB, 5 ; Is the Bit High?
bsf STATUS, C

bcf PORTB, 4 ; Finished with the Data

rrf PData + 1 ; Shift Over the Data
rrf PData

decfsz CCount ; Do 6x
goto CR_Loop

bcf PORTB, 5 ; Make Sure RB7 is Low Upon Exit

bsf INTCON, GIE

bsf STATUS, RP0 ; Restore RB7 to Output
bcf TRISB & 0x07F, 5
bcf STATUS, RP0

movlw 0x07F ; Get Rid of Bad Bits on the Ends
andwf PData + 1
movlw 0x0FE
andwf PData

return


SendCHAR ; Send the Character in "w"

btfsc TXStart ; Wait for the Previous Send to End
goto $ - 1

movwf TXOut ; Send out the Character

bsf TXStart ; Tell the Interrupt Handler that it can Send Something

return


DispMSG ; Display a String

movwf Temp ; Save the Temporary Value

clrf FSR ; Use the FSR as the Index to the String

DM_Loop1 ; Find the Correct String to Display

movf Temp ; Are we at the End?
btfsc STATUS, Z
goto DM_Loop2

movf FSR, w ; Get the Character at the Message
call Msg 
iorlw 0 ; Is it Equal to Zero?
btfsc STATUS, Z
decf Temp ; Yes, At the End of the String

incf FSR ; Point to the Next Message Character

goto DM_Loop1

DM_Loop2 ; Display the String Indexed by FSR

movf FSR, w ; Send the Current Character
call Msg
iorlw 0 ; At the End of the String?
btfsc STATUS, Z
goto DM_End ; Yes

call SendCHAR

incf FSR

goto DM_Loop2

DM_End

return


DispHEX ; Display the HEX Message

movwf Temp ; Save the Value for Later

swapf Temp, w ; Do the High Nybble First
andlw 0x00F
call HEXTable
call SendCHAR

movf Temp, w
andlw 0x00F
call HEXTable
call SendCHAR

return


RXBufReset ; Reset the value in "w" to a valid RXBuf Value

andlw RXBuf + 7 ; Clear Upper Bits of FSR
iorlw RXBuf

; addlw 0 - ( RXBufEnd + 1 )
; btfsc STATUS, C
; addlw RXBuf - ( RXBufEnd + 1 )
; addlw RXBufEnd + 1

return


; Instruction Delays
Dlay16 ; Dlay 16 Cycles
call Dlay8
Dlay8 ; Dlay 8 Cycles
call Dlay4
Dlay4 ; Dlay 4 Cycles
return


RTCDlay ; Use the RTC to Provide a Real Delay

movf RTCHI, w ; Wait for the programming Command to Complete
addlw 2
movwf CmdReady
RTCD_Loop ; Wait for the Programming Command to Complete
movf RTCHI, w
subwf CmdReady, w
btfss STATUS, Z ; Have we waited long enough?
goto RTCD_Loop

return


HEXTable

addlw 0x036 ; Add '0' + 6 to Value
btfsc STATUS, DC ; If Digit Carry Set, then 'A' - 'F'
addlw 7 ; Add Difference Between '9' and 'A'
addlw 0-6

return


end

 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女久久久久高潮| 国产成人免费在线观看不卡| 激情综合色播五月| 成人性生交大片免费| 日韩免费电影网站| 亚洲国产人成综合网站| 成+人+亚洲+综合天堂| 日韩亚洲欧美在线| 亚洲一区二区三区四区在线观看| 国产成人99久久亚洲综合精品| 91.麻豆视频| 亚洲小说春色综合另类电影| 99久久免费精品高清特色大片| 久久综合九色综合欧美98| 天天色图综合网| 欧美日韩美女一区二区| 亚洲欧美日韩电影| 99视频一区二区| 国产日韩欧美制服另类| 激情综合网天天干| 精品福利二区三区| 美脚の诱脚舐め脚责91 | 亚洲成人免费在线| aaa亚洲精品一二三区| 国产精品免费视频网站| 成人免费三级在线| 国产精品免费视频观看| 成人av电影免费在线播放| 国产精品视频一二三区| 成人免费观看av| 中文字幕二三区不卡| 成人小视频免费观看| 国产女人水真多18毛片18精品视频| 国产在线不卡视频| 久久久久久日产精品| 成人免费视频网站在线观看| 中文在线资源观看网站视频免费不卡 | 日本二三区不卡| 亚洲免费在线观看视频| 在线观看日产精品| 午夜精品影院在线观看| 91麻豆精品国产| 美女高潮久久久| 久久精品男人天堂av| 成人精品视频一区| 亚洲九九爱视频| 欧美顶级少妇做爰| 国产一区二区三区视频在线播放| 久久久久久亚洲综合影院红桃| 国产·精品毛片| 亚洲色图20p| 欧美一区三区四区| 国产乱码字幕精品高清av | 色噜噜狠狠一区二区三区果冻| 亚洲一区二区欧美| 日韩欧美久久久| 国产精品一区在线观看乱码| 国产精品初高中害羞小美女文| 欧美三级韩国三级日本一级| 久久精品噜噜噜成人88aⅴ | 99久久国产综合精品麻豆| 一区二区视频免费在线观看| 日韩一区二区视频在线观看| 国产精品88av| 亚洲成人一二三| 国产亚洲欧洲997久久综合| 91小视频在线免费看| 免费观看成人av| 国产精品国产馆在线真实露脸| 欧美日韩中字一区| 成人涩涩免费视频| 日本不卡在线视频| 亚洲免费在线看| 久久奇米777| 91精品国产综合久久久久久漫画| 成人综合在线观看| 日韩高清在线一区| 一色屋精品亚洲香蕉网站| 777奇米成人网| 91在线精品一区二区| 国产麻豆9l精品三级站| 亚洲午夜久久久久久久久电影院 | 白白色亚洲国产精品| 蜜臀a∨国产成人精品| 亚洲在线视频网站| 国产精品卡一卡二| 欧美精品一区二区不卡| 欧美精品在线观看播放| 91免费小视频| 成人免费黄色在线| 国产精品一级在线| 免费成人美女在线观看| 香蕉乱码成人久久天堂爱免费| 国产女主播一区| 久久精品欧美日韩精品| 欧美电影精品一区二区| 欧美精品 国产精品| 91国偷自产一区二区三区成为亚洲经典 | 欧美成人国产一区二区| 欧美日韩一区不卡| 91日韩一区二区三区| 不卡视频在线观看| 欧美肥妇free| 欧美日韩一区高清| 欧美性大战久久久久久久蜜臀| 99久久精品免费看国产免费软件| 国产精品综合一区二区| 国产乱人伦偷精品视频不卡| 激情小说亚洲一区| 国产一二精品视频| 国产高清视频一区| 国产美女精品人人做人人爽| 精品一区二区三区视频| 精品一区二区在线播放| 久久精品国产**网站演员| 蜜臀久久99精品久久久画质超高清 | 国产自产v一区二区三区c| 九九精品一区二区| 国产麻豆91精品| 成人午夜免费av| 91色乱码一区二区三区| 日本大香伊一区二区三区| 欧美亚洲丝袜传媒另类| 在线成人小视频| 2023国产精品自拍| 国产精品久久毛片av大全日韩| 亚洲色欲色欲www在线观看| 亚洲人成7777| 日韩不卡手机在线v区| 精品一区二区免费| 丁香一区二区三区| 色综合久久久久综合体桃花网| 欧美性xxxxxxxx| 日韩欧美一二三四区| 国产色爱av资源综合区| 亚洲美女精品一区| 天天综合天天做天天综合| 国产一区二区三区| 99久久精品国产毛片| 欧美色图在线观看| 欧美一区二区三区视频免费| 精品国产不卡一区二区三区| 国产精品久久久久桃色tv| 亚洲一区二区三区美女| 国产最新精品免费| 色播五月激情综合网| 91精品国产高清一区二区三区| 国产欧美日韩麻豆91| 亚洲国产精品久久人人爱蜜臀| 极品少妇一区二区| 日本精品视频一区二区| 精品区一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 麻豆精品在线看| 91免费在线视频观看| www久久久久| 亚洲电影一区二区三区| 国产成人亚洲综合a∨婷婷图片 | 久久亚洲综合色| 亚洲午夜在线视频| a级精品国产片在线观看| 欧美高清视频在线高清观看mv色露露十八| 国产亲近乱来精品视频| 日韩精品成人一区二区在线| 91丨porny丨首页| 久久精品欧美日韩精品| 蜜桃视频第一区免费观看| 久久久久九九视频| 日本aⅴ亚洲精品中文乱码| 99久久伊人久久99| 久久久99久久| 韩日av一区二区| 3751色影院一区二区三区| 亚洲三级电影全部在线观看高清| 国产综合色产在线精品| 日韩欧美一二区| 日本不卡视频在线| 欧美日韩在线一区二区| 中文字幕一区日韩精品欧美| 国产麻豆精品视频| 久久综合色综合88| 韩国成人在线视频| 欧美成人一区二区三区片免费| 亚洲第一av色| 欧美剧情片在线观看| 亚洲综合区在线| 欧美一a一片一级一片| 亚洲精品自拍动漫在线| 色综合天天综合色综合av| 亚洲天堂成人在线观看| 99久久免费精品高清特色大片| 国产精品久久久久久妇女6080| 国产精品自拍三区| 国产日韩综合av| 成人国产精品免费观看| 国产精品毛片高清在线完整版| 日韩欧美你懂的| 精品一二三四区| 久久久久久久久久看片| 国产成人精品亚洲777人妖|