Electronic Components Datasheet Search
  British  ▼
ALLDATASHEET.CO.UK

X  

PIC18F258TIPQTP Datasheet(PDF) 75 Page - Microchip Technology

Part # PIC18F258TIPQTP
Description  High Performance, 28/40-Pin Enhanced FLASH Microcontrollers with CAN
PDF  384 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18F258TIPQTP Datasheet(HTML) 75 Page - Microchip Technology

Back Button PIC18F258TIPQTP Datasheet HTML 71Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 72Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 73Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 74Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 75Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 76Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 77Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 78Page - Microchip Technology PIC18F258TIPQTP Datasheet HTML 79Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 75 / 384 page
background image
 2002 Microchip Technology Inc.
Preliminary
DS41159B-page 73
PIC18FXX8
EXAMPLE 6-3:
WRITING TO FLASH PROGRAM MEMORY (CONTINUED)
6.5.2
WRITE VERIFY
Depending on the application, good programming
practice may dictate that the value written to the mem-
ory should be verified against the original value. This
should be used in applications where excessive writes
can stress bits near the specification limit.
6.5.3
UNEXPECTED TERMINATION OF
WRITE OPERATION
If a write is terminated by an unplanned event, such as
loss of power or an unexpected RESET, the memory
location just programmed should be verified and repro-
grammed if needed.The WRERR bit is set when a write
operation is interrupted by a MCLR Reset, or a WDT
Time-out Reset during normal operation. In these situ-
ations, users can check the WRERR bit and rewrite the
location.
6.5.4
PROTECTION AGAINST SPURIOUS
WRITES
To reduce the probability against spurious writes to
FLASH program memory, the write initiate sequence
must also be followed. See Section 24.0, Special
Features of the CPU for more detail.
6.6
FLASH Program Operation During
Code Protection
See Section 24.0, Special Features of the CPU for
details on code protection of FLASH program memory.
WRITE_WORD_TO_HREGS
MOVFW
POSTINC0, W
; get low byte of buffer data
MOVWF
TABLAT
; present data to table latch
TBLWT+*
; write data, perform a short write
; to internal TBLWT holding register.
DECFSZ
COUNTER
; loop until buffers are full
BRA
WRITE_WORD_TO_HREGS
PROGRAM_MEMORY
BSF
EECON1,EEPGD
; point to FLASH program memory
BCF
EECON1,CFGS
; access FLASH program memory
BSF
EECON1,WREN
; enable write to memory
BCF
INTCON,GIE
; disable interrupts
MOVLW
55h
; write 55H
Required
MOVWF
EECON2
Sequence
MOVLW
0AAh
; write 0AAH
MOVWF
EECON2
; start program (CPU stall)
BSF
EECON1,WR
NOP
BSF
INTCON,GIE
; re-enable interrupts
DECFSZ
COUNTER_HI
; loop until done
BRA
PROGRAM_LOOP
BCF
EECON1,WREN
; disable write to memory



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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


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