Electronic Components Datasheet Search
  English  ▼

X  

AN247 Datasheet(PDF) 21 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) 21 Page - Microchip Technology

Back Button AN247 Datasheet HTML 17Page - Microchip Technology AN247 Datasheet HTML 18Page - Microchip Technology AN247 Datasheet HTML 19Page - Microchip Technology 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 21 / 32 page
background image
 2003 Microchip Technology Inc.
DS00247A-page 21
AN247
; *****************************************************************************
; Function: VOID _ReadWriteMemory()
;
; PreCondition:Enter only after _CANMain().
; Input: None.
; Output: None.
; Side Effects: N/A.
; Stack Requirements: N/A
; Overview: This routine is technically not a function since it will not
;
return when called. It has been written in a linear form to
;
save space.Thus 'call' and 'return' instructions are not
;
included, but rather they are implied.
;
;
This is the memory I/O engine. A total of eight data
;
bytes are received and decoded. In addition two control
;
bits are received, put/get and control/data.
;
;
A pointer to the buffer is passed via FSR0 for reading or writing.
;
;
The control register set contains a pointer, some control bits
;
and special command registers.
;
;
Control
;
<PG><CD><ADDRL><ADDRH><ADDRU><_RES_><CTLBT><SPCMD><CPDTL><CPDTH>
;
;
Data
;
<PG><CD><DATA0><DATA1><DATA2><DATA3><DATA4><DATA5><DATA6><DATA7>
;
;
PG bit:
Put = 0, Get = 1
;
CD bit:
Control = 0, Data = 1
;
; *****************************************************************************
_ReadWriteMemory:
btfscCAN_CD_BIT
; Write/read data or control registers
bra
_DataReg
; *****************************************************************************
; This routine reads or writes the bootloader control registers,
; then executes any immediate command received.
_ControlReg
lfsr
1, _bootCtlMem
_ControlRegLp1
#ifdef ALLOW_GET_CMD
btfsc
CAN_PG_BIT
; or copy control registers to buffer
movff
POSTINC1, POSTINC0
btfss
CAN_PG_BIT
; Copy the buffer to the control registers
#endif
movff
POSTINC0, POSTINC1
decfsz WREG1, F
bra
_ControlRegLp1
#ifdef ALLOW_GET_CMD
btfsc
CAN_PG_BIT
bra
_CANSendResponce; Send response if get
#endif
; *********************************************************
; This is a no operation command.
movf
_bootSpcCmd, W; NOP Command
bz
_SpecialCmdJp2; or send an acknowledge
; *********************************************************



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