Os motores de busca de Datasheet de Componentes eletrônicos
  Portuguese  ▼
ALLDATASHEETPT.COM

X  

PIC10F320T-EMCSQTP Folha de dados(PDF) 66 Page - Microchip Technology

Nome de Peças PIC10F320T-EMCSQTP
Descrição Electrónicos  6/8-Pin, High-Performance, Flash Microcontrollers
PDF  210 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrônico  MICROCHIP [Microchip Technology]
Página de início  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC10F320T-EMCSQTP Folha de dados(HTML) 66 Page - Microchip Technology

Back Button PIC10F320T-EMCSQTP Datasheet HTML 62Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 63Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 64Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 65Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 66Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 67Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 68Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 69Page - Microchip Technology PIC10F320T-EMCSQTP Datasheet HTML 70Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 66 / 210 page
background image
PIC10(L)F320/322
DS41585A-page 66
Preliminary
 2011 Microchip Technology Inc.
EXAMPLE 9-3:
WRITING TO FLASH PROGRAM MEMORY
; This write routine assumes the following:
; 1. 64 bytes of data are loaded, starting at the address in DATA_ADDR
; 2. Each word of data to be written is made up of two adjacent bytes in DATA_ADDR,
; stored in little endian format
; 3. A valid starting address (the least significant bits = 00000) is loaded in ADDRH:ADDRL
; 4. ADDRH and ADDRL are located in shared data memory 0x70 - 0x7F (common RAM)
;
BCF
INTCON,GIE
; Disable ints so required sequences will execute properly
BANKSEL
PMADRH
; not required on devices with 1 Bank of SFRs
MOVF
ADDRH,W
; Load initial address
MOVWF
PMADRH
;
MOVF
ADDRL,W
;
MOVWF
PMADRL
;
MOVLW
LOW DATA_ADDR
; Load initial data address
MOVWF
FSR0
;
BCF
PMCON1,CFGS
; Not configuration space
BSF
PMCON1,WREN
; Enable writes
BSF
PMCON1,LWLO
; Only Load Write Latches
LOOP
MOVIW
FSR0++
; Load first data byte into lower
MOVWF
PMDATL
;
MOVIW
FSR0++
; Load second data byte into upper
MOVWF
PMDATH
;
MOVF
PMADRL,W
; Check if lower bits of address are '00000'
XORLW
0x1F
; Check if we're on the last of 16 addresses
ANDLW
0x1F
;
BTFSC
STATUS,Z
; Exit if last of 16 words,
GOTO
START_WRITE
;
MOVLW
55h
; Start of required write sequence:
MOVWF
PMCON2
; Write 55h
MOVLW
0AAh
;
MOVWF
PMCON2
; Write AAh
BSF
PMCON1,WR
; Set WR bit to begin write
NOP
; NOP instructions are forced as processor
; loads program memory write latches
NOP
;
INCF
PMADRL,F
; Still loading latches Increment address
GOTO
LOOP
; Write next latches
START_WRITE
BCF
PMCON1,LWLO
; No more loading latches - Actually start Flash program
; memory write
MOVLW
55h
; Start of required write sequence:
MOVWF
PMCON2
; Write 55h
MOVLW
0AAh
;
MOVWF
PMCON2
; Write AAh
BSF
PMCON1,WR
; Set WR bit to begin write
NOP
; NOP instructions are forced as processor writes
; all the program memory write latches simultaneously
NOP
; to program memory.
; After NOPs, the processor
; stalls until the self-write process in complete
; after write processor continues with 3rd instruction
BCF
PMCON1,WREN
; Disable writes
BSF
INTCON,GIE
; Enable interrupts



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


Folha de dados Download

Go To PDF Page


Ligação URL



ALLDATASHEET é útil para você?  [ DONATE ] 

Sobre Alldatasheet   |   Publicidade   |   Contato conosco   |   Privacy Policy   |   Link para a ficha técnica    |   roca de Link   |   Lista de Fabricantes
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