PIC16F721-E/SS Microchip Technology, PIC16F721-E/SS Datasheet - Page 165

no-image

PIC16F721-E/SS

Manufacturer Part Number
PIC16F721-E/SS
Description
7 KB FLASH, 256 B SRAM, 18 I/O 20 SSOP .209in TUBE
Manufacturer
Microchip Technology
Series
PIC® XLP™ 16Fr
Datasheet

Specifications of PIC16F721-E/SS

Core Processor
PIC
Core Size
8-Bit
Speed
16MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
17
Program Memory Size
7KB (4K x 14)
Program Memory Type
FLASH
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 12x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
EXAMPLE 18-2:
 2010 Microchip Technology Inc.
; This write routine assumes the following:
; 1. A valid starting address (the least significant bits = ‘00000’)is loaded in ADDRH:ADDRL
; 2. The 64 bytes of data are loaded, starting at the address in DATADDR
; 3. ADDRH, ADDRL and DATADDR are all located in shared data memory 0x70 - 0x7f
;
LOOP
START_WRITE
BANKSEL PMADRH
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVIW
MOVWF
MOVIW
MOVWF
BSF
BSF
MOVLW
MOVWF
MOVLW
MOVWF
BSF
NOP
NOP
MOVF
XORLW
ANDLW
BTFSC
GOTO
INCF
GOTO
BCF
MOVLW
MOVWF
MOVLW
MOVWF
BSF
NOP
NOP
BCF
ADDRH,W
PMADRH
ADDRL,W
PMADRL
DATAADDRL,W
FSR0L
DATAADDRH,W
FSR0H
INDF0++
PMDATL
INDF0++
PMDATH
PMCON1,WREN
PMCON1,LWLO
55h
PMCON2
AAh
PMCON2
PMCON1,WR
PMADR,W
0x1F
0x1F
STATUS,Z
START_WRITE
PMADR,F
LOOP
PMCON1,LWLO
55h
PMCON2
AAh
PMCON2
PMCON1,WR
PMCON1,WREN
WRITING TO FLASH PROGRAM MEMORY
; Bank 3
; Load initial address
;
;
;
; Load initial data address
;
; Load initial data address
;
; Load first data byte into lower
;
; Load second data byte into upper
;
; Enable writes
; Only Load Write Latches
; Start of required write sequence:
; Write 55h
;
; Write AAh
; Set WR bit to begin write
; Any instructions here are ignored as processor
; halts to begin write sequence
; processor will stop here and wait for write complete
; after write processor continues with 3rd instruction
; Check if lower five bits of address are ‘11111’
; Check if we’re on the last of 8 addresses
;
; Exit if last of 32 words,
;
; Still loading latches Increment address
; Write next latches
; No more Latches only; Actually start write
; Start of required write sequence:
; Write 55h
;
; Write AAh
; Set WR bit to begin write
; Any instructions here are ignored as processor
; halts to begin write sequence
; processor will stop here and wait for write complete
; after write processor continues with 3rd instruction
; Disable writes
PIC16F/LF720/721
DS41430A-page 165

Related parts for PIC16F721-E/SS