DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

TB025 데이터 시트보기 (PDF) - Microchip Technology

부품명
상세내역
제조사
TB025 Datasheet PDF : 8 Pages
1 2 3 4 5 6 7 8
TB025
nop
bcf
banksel
bsf
bsf
bcf
nop
movf
subwf
btfss
retlw
movf
subwf
btfss
retlw
incf
btfsc
incf
decf
goto
DRCkChecksum
call
addwf
btfss
retlw
goto
EndOfFileRec
decf
btfss
goto
call
addwf
btfss
retlw
retlw
EECON1,WREN
EECON1
EECON1,EEPGD
EECON1,RD
STATUS,RP0
EEDATH,W
HexDataH,W
STATUS,Z
0xff
EEDATA,W
HexDataL,W
STATUS,Z
0xff
AddrL,F
STATUS,Z
AddrH,F
ByteCount,F
DRLoop
GetHex8
LineChecksum,W
STATUS,Z
1
DCStart
RecType,W
STATUS,Z
DCStart
GetHex8
LineChecksum,W
STATUS,Z
1
0
;Disable writes
;Read sequence
;Set EEPGD to indicate program memory
;Enable reads from memory
;Compare memory value to HexDataH:HexDataL
;If upper byte not equal, return FFh
; to indicate programming failure
;If lower byte not equal, return FFh
; to indicate programming failure
;Increment address for next iteration
;Decrement byte count
;Go back to check for ByteCount = 0
;Checksum verification
;Read in checksum
;Add to calculated checksum
;Result should be 0
; If not return 1 to indicate checksum fail
;Do it again
;End of File record (01h)
;If EOF record, decrement should = 0
;Not valid record type, wait for next :
;Read in checksum
;Add to calculated checksum
;Result should be 0
; If not return 1 to indicate checksum fail
;Otherwise return 0 to indicate success
GetByte
; Insert your code here to retrieve a byte of data from
; the desired interface. In this case it is the USART on F877.
;clear CTS
;
banksel PIR1
;GH4Waitbtfss
PIR1,RCIF
;
goto
GH4Wait
;set CTS
nop
banksel
RCREG
movf
RCREG,W
return
GetHex8
call
call
movwf
swapf
GetByte
ASCII2Hex
Temp
Temp,F
;This function uses the USART
;Read a character from the USART
;Convert the character to binary
;Store result in high nibble
call
call
iorwf
movf
return
GetByte
ASCII2Hex
Temp,F
Temp,W
;Read a character from the USART
;Convert the character to binary
;Store result in low nibble
;Move result into WREG
© 1998 Microchip Technology Inc.
DS91025A-page 5

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]