Electronic Components Datasheet Search
  English  ▼

X  

AN247 Datasheet(PDF) 24 Page - Microchip Technology

Part # AN247
Description  A CAN Bootloader for PIC18F CAN Microcontrollers
PDF  32 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

AN247 Datasheet(HTML) 24 Page - Microchip Technology

Back Button AN247 Datasheet HTML 20Page - Microchip Technology AN247 Datasheet HTML 21Page - Microchip Technology AN247 Datasheet HTML 22Page - Microchip Technology AN247 Datasheet HTML 23Page - Microchip Technology AN247 Datasheet HTML 24Page - Microchip Technology AN247 Datasheet HTML 25Page - Microchip Technology AN247 Datasheet HTML 26Page - Microchip Technology AN247 Datasheet HTML 27Page - Microchip Technology AN247 Datasheet HTML 28Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 24 / 32 page
background image
AN247
DS00247A-page 24
 2003 Microchip Technology Inc.
; *****************************************************************************
; Function: VOID _PMRead()
;
VOID _PMEraseWrite()
;
; PreCondition:WREG1 and FSR0 must be loaded with the count and address of
;
the source data.
; Input: None.
; Output: None.
; Side Effects: N/A.
; Stack Requirements: N/A
; Overview: These routines are technically not functions since they will not
;
return when called. They have been written in a linear form to
;
save space.Thus 'call' and 'return' instructions are not
;
included, but rather they are implied.
;
;
These are the program memory read/write functions. Erase is
;
available through control flags. An automatic erase option
;
is also available. A write lock indicator is in place to
;
ensure intentional write operations.
;
;
Note: write operations must be on 8-byte boundaries and
;
must be 8 bytes long. Also erase operations can only
;
occur on 64-byte boundaries.
;
; *****************************************************************************
#ifdef ALLOW_GET_CMD
_PMRead:
tblrd*+
; Fill the buffer
movff
TABLAT, POSTINC0
decfsz WREG1, F
bra
_PMRead
; Not finished then repeat
bra
_CANSendResponce
#endif
_PMEraseWrite:
btfss
MODE_AUTO_ERASE
; Erase if auto erase is requested
bra
_PMWrite
_PMErase:
movf
TBLPTRL, W
; Check for a valid 64 byte border
andlw
b'00111111'
bnz
_PMWrite
_PMEraseJp1
movlw
b'10010100'
; Setup erase
rcall
_StartWrite
; Erase the row
_PMWrite:
btfsc
MODE_ERASE_ONLY
; Don't write if erase only is requested
#ifdef ALLOW_GET_CMD
bra
_CANSendAck
#else
bra
_CANMain
#endif
movf
TBLPTRL, W
; Check for a valid 8 byte border
andlw
b'00000111'
bnz
_CANMain
movlw
0x08
movwf
WREG1



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com