参数资料
型号: PIC12F1840T-I/MF
厂商: Microchip Technology
文件页数: 8/122页
文件大小: 0K
描述: MCU 7KB FLASH 256B RAM XLP 8DFN
标准包装: 3,300
系列: PIC® XLP™ 12F
核心处理器: PIC
芯体尺寸: 8-位
速度: 32MHz
连通性: I²C,LIN,SPI,UART/USART
外围设备: 欠压检测/复位,POR,PWM,WDT
输入/输出数: 5
程序存储器容量: 7KB(4K x 14)
程序存储器类型: 闪存
EEPROM 大小: 256 x 8
RAM 容量: 256 x 8
电压 - 电源 (Vcc/Vdd): 2.3 V ~ 5.5 V
数据转换器: A/D 4x10b
振荡器型: 内部
工作温度: -40°C ~ 85°C
封装/外壳: 8-VDFN 裸露焊盘
包装: 带卷 (TR)
2011 Microchip Technology Inc.
Preliminary
DS41441B-page 105
PIC12(L)F1840
EXAMPLE 11-5:
WRITING TO FLASH PROGRAM MEMORY
; This write routine assumes the following:
; 1. The 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
;
BCF
INTCON,GIE
; Disable ints so required sequences will execute properly
BANKSEL
EEADRH
; Bank 3
MOVF
ADDRH,W
; Load initial address
MOVWF
EEADRH
;
MOVF
ADDRL,W
;
MOVWF
EEADRL
;
MOVLW
LOW DATA_ADDR
; Load initial data address
MOVWF
FSR0L
;
MOVLW
HIGH DATA_ADDR ; Load initial data address
MOVWF
FSR0H
;
BSF
EECON1,EEPGD
; Point to program memory
BCF
EECON1,CFGS
; Not configuration space
BSF
EECON1,WREN
; Enable writes
BSF
EECON1,LWLO
; Only Load Write Latches
LOOP
MOVIW
FSR0++
; Load first data byte into lower
MOVWF
EEDATL
;
MOVIW
FSR0++
; Load second data byte into upper
MOVWF
EEDATH
;
MOVF
EEADRL,W
; Check if lower bits of address are '00000'
XORLW
0x1F
; Check if we're on the last of 32 addresses
ANDLW
0x1F
;
BTFSC
STATUS,Z
; Exit if last of 32 words,
GOTO
START_WRITE
;
MOVLW
55h
; Start of required write sequence:
MOVWF
EECON2
; Write 55h
MOVLW
0AAh
;
MOVWF
EECON2
; Write AAh
BSF
EECON1,WR
; Set WR bit to begin write
NOP
; Any instructions here are ignored as processor
; halts to begin write sequence
NOP
; Processor will stop here and wait for write to complete.
; After write processor continues with 3rd instruction.
INCF
EEADRL,F
; Still loading latches Increment address
GOTO
LOOP
; Write next latches
START_WRITE
BCF
EECON1,LWLO
; No more loading latches - Actually start Flash program
; memory write
MOVLW
55h
; Start of required write sequence:
MOVWF
EECON2
; Write 55h
MOVLW
0AAh
;
MOVWF
EECON2
; Write AAh
BSF
EECON1,WR
; Set WR bit to begin write
NOP
; Any instructions here are ignored as processor
; halts to begin write sequence
NOP
; Processor will stop here and wait for write complete.
; after write processor continues with 3rd instruction
BCF
EECON1,WREN
; Disable writes
BSF
INTCON,GIE
; Enable interrupts
Required
S
equence
Required
Sequenc
e
相关PDF资料
PDF描述
VE-J3W-IW-F1 CONVERTER MOD DC/DC 5.5V 100W
PIC16LF1903T-I/SS MCU 7KB FLASH 256B RAM 28SSOP
VE-J3V-IW-F1 CONVERTER MOD DC/DC 5.8V 100W
PIC16LF1902-E/SO MCU 3.5KB FLASH 128B RAM 28SOIC
VE-J3P-IW-F3 CONVERTER MOD DC/DC 13.8V 100W
相关代理商/技术参数
参数描述
PIC12F505 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers
PIC12F505TE/MC 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers
PIC12F505TE/MG 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers
PIC12F505TE/MS 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers
PIC12F505TE/P 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers