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

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

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

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

Loop_NoEnter ; Now, Handle the Character (if Possible)

movf Command ; If Something is There - Ignore
btfss STATUS, Z
goto Loop

xorlw 10 ; Make it Regular ASCII
addlw 255 - 'z' ; Get the High limit
addlw 'z' - 'a' + 1 ; Add Lower Limit to Set Carry
btfss STATUS, C ; If Carry Set, then Lower Case
addlw 0x020 ; Carry NOT Set, Restore Character
addlw 'A' ; Add 'A' to restore the Character
movwf Command ; And Store It
call SendCHAR

goto Loop


Handle_Command ; Command Entered, Handle It

movf Command, w ; Handle the Value
xorlw 'E' ; Start with (E)PROM
btfss STATUS, Z
goto HC_NotE ; Nope
HC_E

bsf FlashEPROM ; Set the EEPROM Flag

movlw 1 ; Start the New Line
call DispMSG

goto Prompt


HC_NotE ; Not EPROM

xorlw 'E' ^ 'F' ; Flash?
btfss STATUS, Z
goto HC_NotF
HC_F ; Flash Specified

bcf FlashEPROM

movlw 1 ; Start the New Line
call DispMSG

goto Prompt


HC_NotF ; Flash Not Specified - "H"elp?

clrf SpeedTemp ; Use "SpeedTemp" to Set the Program Speed

xorlw 'F' ^ '1' ; Execute the Program?
btfsc STATUS, Z
goto HC_1MHz ; At One MHz
xorlw '1' ^ '2'
btfsc STATUS, Z
goto HC_2MHz ; At Two MHz
xorlw '2' ^ '4'
btfsc STATUS, Z 
goto HC_4MHz ; At Four MHz
xorlw '4' ^ '8'
btfss STATUS, Z ; At Eight MHz
goto HC_NotExecute ; Nothing Executing
goto HC_8MHz ; Make Sure 8 MHz Setup Correctly

HC_1MHz ; 1 MHz, Increment Temp ( = 3 )
incf SpeedTemp
HC_2MHz ; 2 MHz, Increment Temp ( = 2 )
incf SpeedTemp
HC_4MHz ; 4 MHz, Increment Temp ( = 1 )
incf SpeedTemp 
HC_8MHz ; 8 MHz, No Increment of Temp ( = 0 )

movlw 1 ; start a New Line for Executing
call DispMSG
movlw 4
call DispMSG
movlw 11
call DispMSG
movlw 1
call DispMSG
btfsc TXStart ; Wait for the Previous Send to End
goto $ - 1

bsf PORTA, 0 ; Turn On the Power

rlf SpeedTemp ; Move Temp up to the Correct Speed
rlf SpeedTemp
movlw 0x00C ; Clear any other Bits
andwf SpeedTemp

movlw 0x013 ; Get PORTA for Merging with Temp
andwf PORTA, w
iorwf SpeedTemp, w ; Merge the Temp Bits In as well
movwf PORTA

bsf Passthru ; Enable the Passthru Setup

bsf PORTB, 6 ; Turn On the External Reset
bsf PORTB, 3 ; Enable U2

Run_Loop ; Execute Here, Follow How it's going

btfsc PORTB, 2 ; Output External and PIC Reset According to Button
goto RL_HIGH ; Everything is Running

bcf PORTB, 3 ; Disable U2
bcf PORTB, 6 ; Turn OFF External Reset

goto RL_SerCheck ; Now, Check for a Serial "End" Character

RL_HIGH ; Make Sure Everything's High

bsf PORTB, 6
bsf PORTB, 3

RL_SerCheck ; Now, Wait for the 0x003 Character to End

movf NextINS, w ; See if the Value Has Moved
subwf NextRX, w
btfsc STATUS, Z
goto Run_Loop ; It Hasn't, Keep Looping Around

movf NextINS, w ; Get the Instruction Read In
movwf FSR ; Output It

incf NextINS, w ; Point to the Next Value in the Buffer
call RXBufReset
movwf NextINS

movf INDF, w ; Get the Character That Was Just Read in
xorlw 3 ; Is it the Stop Character?
btfss STATUS, Z
goto Run_Loop ; Nope

bcf PORTB, 6 ; Make External Reset Active
bcf PORTB, 3 ; Turn OFF the PIC
bcf Passthru ; Turn Off the Passthru
bcf PORTA, 0 ; Turn Off the PIC

movlw 1 ; Start a New Line to Show we're Finished
call DispMSG

goto Prompt ; Finished Executing, End and Return


HC_NotExecute ; Nothing Running; Just Programming Commands

xorlw '8' ^ 'B'
btfss STATUS, Z
goto HC_NotBlank
HC_Blank

btfsc FlashEPROM ; If Bit Set, Can Check for Blanks
goto HC_BlankCheck

movlw 3 ; Flash Memory - Can't Check for Blanks
call DispMSG

goto Prompt ; Finished with the Blank Check - End

HC_BlankCheck ; Now, We can Check for Blanks

call BlankCheck ; Use the Subroutine

movlw 1 ; Finish off the Line
call DispMSG

goto Prompt


HC_NotBlank ; Not Blank/Check for Program/Verify

xorlw 'B' ^ 'P'
btfss STATUS, Z
goto HC_NotProgram
HC_Program

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

btfss FlashEPROM ; Do we Have Flash (Can Just Program)?
goto HCP_Flash ; Yes, 

HCP_EPROM 

btfsc LastError ; Only Do Blank Check if LastError is NOT Set
goto HCP_Start

call BlankCheck ; See if the Part In there is Blank

movf Command
btfsc STATUS, Z
goto HCP_Start ; The Part is Blank, No Issues with Starting to Program

goto Prompt ; The Part isn't Blank - Error...

HCP_Flash ; Flash Parts

call PowerON ; Turn on VDD/Vpp and Enable RB6/RB7 Drivers

movlw 5 ; Mark that we are Clearing Memory
call DispMSG 

movlw 0x0FE
movwf PData ; Go into the Configuration Memory
movlw 0x07F
movwf PData + 1
movlw 0
call CmdWRITE

movlw 7 ; Go to 0x02007
movwf CmdReady
HCPF_ConfigLoop
movlw 6 ; Increment the Counter
call CmdSEND
decfsz CmdReady
goto HCPF_ConfigLoop

movlw 1 ; David Tait's Defeat Code Protection Code
call CmdSEND

movlw 7
call CmdSEND

movlw 8 ; Burn the New Values In
call CmdSEND

call RTCDlay

movlw 1 ; Microchip's CP Defeat Code
call CmdSEND

movlw 7
call CmdSEND

movlw 0x07F
movwf PData
movlw 0x0FE
movwf PData + 1
movlw 9 ; Do Bulk Erase of Program/Config Memory
call CmdSEND

movlw 8 ; Start Clearing the Memory (Begin Programming)
call CmdSEND

call RTCDlay ; Wait for the Instruction to Complete

call Poweroff ; Turn OFF the Power and RB6 and RB7 Drivers

HCP_Start

incf RTClo, w ; Wait at least 100 usec for the Line to Settle
addlw 2
movwf Command
HCP_Settle
movf Command, w
xorwf RTClo, w
btfss STATUS, Z
goto HCP_Settle

call PowerON ; Turn On Vpp/Vdd and Enable RB6/RB7

movf NextRX, w ; Going to Wait for one Circle of the RTC - Clear the RX Char
movwf NextINS

movlw 9 ; Tell the User to Start the Download
call DispMSG
movlw 11
call DispMSG

movf RTCHI, w ; Will Wait up to One Second
movwf CmdReady
HCP_DLWait ; Have to Wait for RTCHI to Change
movf CmdReady, w
subwf RTCHI, w
btfsc STATUS, Z
goto HCP_DLWait

HCP_DownLoadWait ; Now, Wait for the Data to Start Coming in

movf NextINS, w ; Has something Been Received
subwf NextRX, w
btfsc STATUS, Z
goto HCPDLW_Skip

movf NextINS, w ; Look at the Character
movwf FSR

movlw 3 ; Do we have a "Ctrl-C"?
subwf INDF, w
btfsc STATUS, Z
goto HCP_End ; Yes, End the Programming

goto HCP_Loop ; *Now*, We can Start Programming

HCPDLW_Skip

movf RTCHI, w
xorwf CmdReady, w ; Has RTC Timed Out?
btfss STATUS, Z
goto HCP_DownLoadWait ; Nope, Keep Waiting

movlw 10 ; Display the Timeout Message
call DispMSG

goto HCP_End


HCP_Loop ; Start Programming the PIC

movf NextINS, w ; Wait for the First Byte of the Line to be Loaded
subwf NextRX, w
btfsc STATUS, Z
goto HCP_Loop ; Not Loaded Yet - Keep Waiting

movf NextINS, w ; Get what was Loaded
movwf FSR

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

movf INDF, w ; Get the Character and Check for Valid
xorlw ':'
btfsc STATUS, Z
goto HCPL_GetChars ; Valid Start, Now, Get the Characters

call DownLoadWait ; Wait for the Download to Complete before Sending the Message

movlw 1 ; Invalid File - Error
call DispMSG
movlw 8
call DispMSG
movlw 6
call DispMSG

goto HCP_End

HCPL_GetChars ; Get the Number of Characters Program In

movf NextINS, w ; This will take waiting for two Characters
addlw 2
call RXBufReset
movwf CmdReady
HCPL_GCWait 
movf CmdReady, w
subwf NextRX, w
btfss STATUS, Z ; Do we Have a Match?
goto HCPL_GCWait

movf NextINS, w ; Do we have a Full 8 Characters?
movwf FSR
movf INDF, w
addlw 0 - '1'
btfss STATUS, Z
goto HCPL_GetCount ; Nope, Have to Get the Count

movlw 0x010 ; Else, Doing a Full Line of 8

goto HCPL_HaveGC

HCPL_GetCount ; Have to See what the Value is to Get

incf NextINS, w ; Point to One Past Current
call RXBufReset
movwf FSR

movf INDF, w ; Get the Value
btfsc INDF, 6 ; "A"+?
addlw 0 - 7 ; Yes, Reduce it
addlw 0 - '0' ; Have a Nybble

HCPL_HaveGC ; "w" has 2x the Count Value

movwf LineCount
bcf STATUS, C ; Divide by 2
rrf LineCount

movf NextINS, w ; Skip Over these Two Instructions
addlw 2
call RXBufReset
movwf NextINS

HCPL_GetAddress

addlw 4 ; And Add 4 to it to get the Expected Address value
call RXBufReset
movwf CmdReady
HCPLGA_Wait ; Wait for the four Characters to be Entered
movf NextRX, w
subwf CmdReady, w
btfss STATUS, Z
goto HCPLGA_Wait

HCPLGA_HaveAddress ; Address has been Entered

HCPLGA_Loop ; Loop Here for Each of the Four Characters 

swapf TData + 1, w ; Move Everything Over for Getting the Character
andlw 0x0F0
movwf TData + 1
swapf TData, w 
andlw 0x00F
iorwf TData + 1
swapf TData, w
andlw 0x0F0
movwf TData

movf NextINS, w ; Get the Current Character
movwf FSR
movf INDF, w
btfsc INDF, 6 ; > 9? ("A" - "F")
addlw 0 - 7
addlw 0 - '0' ; Get Nybble
iorwf TData ; Save it in the Value

incf NextINS, w ; Now, Point to the Next Character
call RXBufReset
movwf NextINS ; Save the Currently Read in Value

subwf CmdReady, w ; Are we at the End?
btfss STATUS, Z
goto HCPLGA_Loop

bcf STATUS, C ; Divide the Address by 2
rrf TData + 1
rrf TData

movf TData + 1, w ; Is Everything Zero (ie at the End of the File?
iorwf TData, w
iorwf LineCount, w
btfsc STATUS, Z
goto HCP_Finished ; Yes, Just have to wait for the Last 0x00A

movf TData + 1, w ; Do we Skip to the Configuration Memory?
xorwf PC + 1, w
andlw 0x020 ; If there's Just 0x020 Left then Yes...
btfsc STATUS, Z
goto HCP_IncCheck ; No, Do the Incrementing Check

movlw 0x020 ; Else, Yes, Move the PC into the Incrementing Area
movwf PC + 1
clrf PC

clrf PData ; Send Nothing to the Configuration Value
clrf PData + 1

movlw 0 ; Move the PIC into the Configuration Memory
call CmdWRITE

HCP_IncCheck ; Do We Have a Valid Difference?

; #### - Put in New Difference Check

movf PC + 1, w ; Do 16 Bit Subtract on the Address
subwf TData + 1, w
movwf CmdReady
movf PC, w
subwf TData, w
btfss STATUS, C
decf CmdReady
addlw 0 - 48 ; Is it == 48 or Greater?
btfss STATUS, C
decf CmdReady
btfsc CmdReady, 7
goto HCP_Inc


; movf PC, w ; Can Just Go With the PCLows
; subwf TData, w
; addlw 0 - 48 ; Up to 48 Possible
; btfss STATUS, C
; goto HCP_Inc ; It's Okay, Increment Away

call DownLoadWait ; Wait for DownLoad to Complete before Sending Message

movlw 1 ; Put in the Error Messages
call DispMSG
movlw 7 
call DispMSG
movlw 6
call DispMSG

goto HCP_End

HCP_Inc ; Now, We Can Just Increment to the appropriate Value

movf TData, w ; Keep Incrementing Until a Match
subwf PC, w
btfsc STATUS, Z
goto HCP_ProgramStart ; Can Start Programming

movlw 6 ; Increment the Address
call CmdSEND

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

goto HCP_Inc

HCP_ProgramStart ; *Now* we can Start Waiting for the Program...

movlw 6
addwf NextINS, w ; Get the Offset to the End of the Data
call RXBufReset
movwf CmdReady
HCPPS_Wait ; Wait for the Six Characters to be Entered
movf NextRX, w
subwf CmdReady, w
btfss STATUS, Z
goto HCPPS_Wait

movlw 2 ; Move NextINS 2 Up on where we are to skip the "00"s
addwf NextINS, w
call RXBufReset
movwf NextINS

HCP_ProgramLoop ; Loop Back Here After Every Address Programmed

movf NextRX, w ; Save to Where We're Going
movwf CmdReady

movf NextINS, w ; Get the Current four Characters...
movwf FSR

HCPPL_Cycle0 ; Do 4x

swapf TData, w ; Shift the Hex Values Up
andlw 0x0F0 ; NOTE!!! lo and High Are reversed to Get Correct Values
movwf TData
swapf TData + 1, w
andlw 0x00F
iorwf TData
swapf TData + 1, w
andlw 0x0F0
movwf TData + 1

movf INDF, w ; Get the Character Pointed To
btfsc INDF, 6 ; Convert to a Nybble
addlw 0 - 7
addlw 0 - '0' 
iorwf TData + 1 ; Save the Low Value of the Number

incf FSR, w
call RXBufReset
movwf FSR
movwf NextINS

subwf CmdReady, w ; Are we At the End?
btfss STATUS, Z
goto HCPPL_Cycle0

HCPPL_Cycle1Wait ; Now, Wait for Next to go to the Next Cycle
movf CmdReady, w
subwf NextRX, w
btfsc STATUS, Z
goto HCPPL_Cycle1Wait

HCPPL_Cycle1 ; Second Cycle, Send out the Programming info

bcf STATUS, C ; Begin Programming
rlf TData, w ; Put the Program Value in Data for Output
movwf PData
rlf TData + 1, w
movwf PData + 1

btfsc Verify ; Are We Verifying or Programming?
goto HCPPL_VerifySkip ; Verifying, Don't Start Programming

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av片在线观看| 欧美高清精品3d| 欧美精品成人一区二区三区四区| 日韩一区二区麻豆国产| 亚洲天堂福利av| 久久99九九99精品| 欧美三区免费完整视频在线观看| 久久久精品国产免大香伊| 午夜私人影院久久久久| 99re热这里只有精品免费视频 | 亚洲高清免费观看高清完整版在线观看| 免费观看久久久4p| 91福利精品第一导航| 欧美极品美女视频| 国产一区二区成人久久免费影院| 在线亚洲人成电影网站色www| 精品国产网站在线观看| 石原莉奈在线亚洲二区| 欧美日韩一级片在线观看| 亚洲精品亚洲人成人网| 99精品国产视频| 国产精品电影一区二区| 国产成人精品综合在线观看| 久久婷婷久久一区二区三区| 精品一区二区三区免费毛片爱| 欧美日韩国产首页在线观看| 亚洲一区在线免费观看| 在线观看视频一区| 一区二区三区视频在线看| 色94色欧美sute亚洲线路一久| 亚洲欧洲韩国日本视频| 91小视频免费观看| 亚洲最大的成人av| 欧美性一级生活| 日韩精品电影一区亚洲| 91精品婷婷国产综合久久竹菊| 午夜av一区二区| 制服视频三区第一页精品| 无码av免费一区二区三区试看| 欧美日韩在线观看一区二区| 亚洲3atv精品一区二区三区| 欧美日韩另类一区| 免费高清视频精品| 精品va天堂亚洲国产| 韩国欧美国产1区| 国产清纯美女被跳蛋高潮一区二区久久w | 图片区日韩欧美亚洲| 欧美精品vⅰdeose4hd| 久久国产麻豆精品| 日本一区二区在线不卡| 99久久精品免费看国产免费软件| 亚洲欧洲在线观看av| 欧美日韩国产天堂| 美腿丝袜一区二区三区| 国产欧美日韩中文久久| 91麻豆免费看片| 奇米亚洲午夜久久精品| 国产亚洲欧美日韩在线一区| 97se亚洲国产综合自在线观| 亚洲一区二区视频| 久久夜色精品国产噜噜av| 成人午夜精品在线| 亚洲永久精品国产| 精品久久久三级丝袜| 91在线无精精品入口| 日韩高清电影一区| 国产精品网站在线| 337p亚洲精品色噜噜噜| 成人白浆超碰人人人人| 日本一不卡视频| 中文欧美字幕免费| 4438x成人网最大色成网站| 成人永久免费视频| 日韩和欧美一区二区三区| 中文字幕中文字幕一区二区 | 色欧美日韩亚洲| 久久精品二区亚洲w码| 亚洲久草在线视频| 精品国产一区二区三区久久影院| 色av综合在线| 国产成a人无v码亚洲福利| 香蕉av福利精品导航| 国产精品美女www爽爽爽| 日韩一区二区麻豆国产| 欧洲在线/亚洲| a4yy欧美一区二区三区| 国产一区二区三区免费播放| 亚洲一区二区三区不卡国产欧美| 久久精品人人做人人爽人人| 欧美一区二区三区免费| 欧美主播一区二区三区| 99久久精品免费精品国产| 国产一区二区不卡老阿姨| 婷婷丁香激情综合| 亚洲影院在线观看| 亚洲精品久久7777| 国产精品美女久久久久av爽李琼| 欧美成人精精品一区二区频| 在线综合亚洲欧美在线视频| 欧美网站一区二区| 97se狠狠狠综合亚洲狠狠| 成人免费毛片嘿嘿连载视频| 国内精品免费**视频| 久久精品久久99精品久久| 日韩成人伦理电影在线观看| 三级影片在线观看欧美日韩一区二区| 国产精品久久久久久亚洲毛片| 久久综合网色—综合色88| 日韩欧美国产午夜精品| 欧美精品在线视频| 7777精品久久久大香线蕉| 欧美三级视频在线| 欧美性猛片xxxx免费看久爱| 日本国产一区二区| 91福利社在线观看| 欧美日韩你懂得| 4438成人网| 欧美mv日韩mv国产| 久久久精品tv| 国产精品三级电影| 中文字幕综合网| 亚洲影院免费观看| 蜜臀久久久99精品久久久久久| 日本亚洲免费观看| 狠狠色综合日日| 大白屁股一区二区视频| 91在线精品一区二区| 在线免费观看一区| 在线91免费看| 久久久精品黄色| 一级日本不卡的影视| 无吗不卡中文字幕| 国产在线国偷精品产拍免费yy| 国产精品一线二线三线| 不卡欧美aaaaa| 欧美另类z0zxhd电影| 欧美sm美女调教| 亚洲日本丝袜连裤袜办公室| 午夜欧美视频在线观看| 国产一区福利在线| 色视频成人在线观看免| 日韩欧美在线1卡| 欧美激情在线观看视频免费| 一区二区三区国产精华| 日韩专区在线视频| 成人激情免费视频| 欧美群妇大交群中文字幕| 久久精品视频一区| 天堂影院一区二区| 国产91清纯白嫩初高中在线观看| 91美女蜜桃在线| 精品国产电影一区二区| 亚洲人成电影网站色mp4| 免费看欧美美女黄的网站| 不卡的av电影在线观看| 91精品国产高清一区二区三区蜜臀| 久久久久99精品国产片| 亚洲国产精品久久久久秋霞影院| 国模无码大尺度一区二区三区| 91麻豆6部合集magnet| 久久综合国产精品| 日精品一区二区| 色综合网站在线| 久久精品一区八戒影视| 日日夜夜免费精品视频| 一本大道av一区二区在线播放 | 欧美性猛交xxxx黑人交| 国产日韩亚洲欧美综合| 日本最新不卡在线| 在线观看www91| 国产精品麻豆久久久| 寂寞少妇一区二区三区| 欧美日韩一区二区电影| 亚洲婷婷国产精品电影人久久| 国产一区二区三区免费| 欧美一区二区三区播放老司机| 亚洲精选视频免费看| 成人免费av在线| 国产亚洲一区二区三区四区| 日本欧美一区二区三区| 欧美三级视频在线播放| 亚洲美女精品一区| 91在线免费视频观看| 国产精品乱人伦| 风间由美一区二区三区在线观看| 日韩亚洲欧美在线| 午夜影院在线观看欧美| 欧洲一区二区三区在线| 亚洲欧美国产毛片在线| 91亚洲精品一区二区乱码| 中文字幕一区二区三区色视频| 国产精品1024| 久久久无码精品亚洲日韩按摩| 麻豆成人免费电影| 精品国产伦一区二区三区观看方式 | 91视频观看视频| 亚洲欧洲三级电影| 99久久精品国产一区二区三区 | 久久综合狠狠综合久久综合88| 蜜桃视频在线观看一区|