| Electronic Components Datasheet Search |
|
AN247 Datasheet(PDF) 24 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
AN247 Datasheet(HTML) 24 Page - Microchip Technology |
|
24 / 32 page ![]() 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 |
|
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 |
| 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 |