파트넘버.co.kr TB026 데이터시트 PDF


TB026 반도체 회로 부품 판매점

Calculating Program Memory Checksums Using a PIC16F87X



Microchip Technology 로고
Microchip Technology
TB026 데이터시트, 핀배열, 회로
M
TB026
Calculating Program Memory Checksums Using a PIC16F87X
Author: Rodger Richey
Microchip Technology Inc.
www.DataSheet4U.comINTRODUCTION
Many applications require the microcontroller to cal-
culate a checksum on the program memory to deter-
mine if the contents have been corrupted. Until now,
the only family of PICmicro® microcontrollers to have
the capability to read from program memory are the
PIC17CXXX devices. The PIC16F87X devices are
the first 14-bit core PICmicro microcontrollers that
are able to access program memory in the same
fashion as used with data EEPROM memory. These
devices are FLASH extensions of the popular
PIC16C7X family. Table 1 shows a comparison
between the two PICmicro microcontroller families.
TABLE 1: PIC16C7X vs. PIC16F87X
Feature
PIC16C7X
Pins
28 or 40
Timers
3
Interrupts
11 or 12
Communica-
tion
PSP, USART,
SSP (SPI or I2C
Slave)
Frequency
20 MHz
A/D 8-bit
CCP
2
Program Mem. 4K or 8K EPROM
RAM
192 or 368 bytes
Data EEPROM None
Other
---
PIC16C87X
28 or 40
3
13 or 14
PSP, USART,
SSP( SPI or I2C
Master/Slave)
20 MHz
10-bit
2
4K or 8K FLASH
192 or 368 bytes
128 or 256 bytes
In-Circuit Debugger
ACCESSING MEMORY
The data EEPROM and FLASH Program memory are
both accessed using the same method. An address
and/or data value are stored in Special Function Reg-
isters (SFR) and then memory is accessed using con-
trol bits in other SFRs. There are six SFRs required to
access memory:
• EECON1
• EECON2
• EEDATA
• EEDATH
• EEADR
• EEADRH
When interfacing to data EEPROM memory, the
address is stored in the EEADR register and the data is
accessed using the EEDATA register. The operation is
controlled using the EECON1 and EECON2 registers. The
register map for EECON1 is shown in Figure 1. EECON2
is not a physical register. Reading it will result in all '0's.
This register is used exclusively in the EEPROM and
FLASH write sequences.
When interfacing to FLASH program memory, the
address is stored in the EEADRH:EEADR registers and
the data is accessed using the EEDATH:EEDATA regis-
ters. Since the same set of control registers are used
to access data and program memory, the EEPGD bit
(EECON1<7>) is used to indicate to the microcontroller
whether the operation is going to be on data memory
(EEPGD = 0) or program memory (EEPGD = 1). Refer to
Section 7.0 in the PIC16F87X data sheet (DS30292)
for more information about using the EEPROM and
FLASH memories.
© 1998 Microchip Technology Inc.
DS91026A-page 1


TB026 데이터시트, 핀배열, 회로
TB026
FIGURE 1: EECON1 REGISTER
R/W-x
EEPGD
bit7
bit 7:
U-0
U-0
U-0
R/W-x R/W-0
R/S-0 R/S-0
WRERR WREN WR
RD
R = Readable bit
bit0 W = Writable bit
S = Settable bit
U = Unimplemented bit,
read as ‘0’
- n = Value at POR reset
EEPGD: Program / Data EEPROM Select bit
1 = Accesses Program memory
0 = Accesses data memory
Note: This bit cannot be changed while a write operation is in progress.
bit 6:4:
www.DataSheet4U.cboimt 3:
Unimplemented: Read as '0'
WRERR: EEPROM Error Flag bit
1 = A write operation is prematurely terminated
(any MCLR reset or any WDT reset during normal operation)
0 = The write operation completed
bit 2:
WREN: EEPROM Write Enable bit
1 = Allows write cycles
0 = Inhibits write to the EEPROM
bit 1:
WR: Write Control bit
1 = initiates a write cycle. (The bit is cleared by hardware once write is complete.
The WR bit can only be set (not cleared) in software.
0 = Write cycle to the EEPROM is complete
bit 0:
RD: Read Control bit
1 = Initiates an EEPROM read (read takes one cycle. RD is cleared in hardware.
The RD bit can only be set (not cleared) in software).
0 = Does not initiate an EEPROM read
DS91026A-page 2
© 1998 Microchip Technology Inc.




PDF 파일 내의 페이지 : 총 6 페이지

제조업체: Microchip Technology

( microchip )

TB026 data

데이터시트 다운로드
:

[ TB026.PDF ]

[ TB026 다른 제조사 검색 ]




국내 전력반도체 판매점


상호 : 아이지 인터내셔날

전화번호 : 051-319-2877

[ 홈페이지 ]

IGBT, TR 모듈, SCR, 다이오드모듈, 각종 전력 휴즈

( IYXS, Powerex, Toshiba, Fuji, Bussmann, Eaton )

전력반도체 문의 : 010-3582-2743



일반적인 전자부품 판매점


디바이스마트

IC114

엘레파츠

ICbanQ

Mouser Electronics

DigiKey Electronics

Element14


관련 데이터시트


TB0213A

IF SAW Filter Low Loss 70MHz - Golledge



TB0213A

(TB0xxxA) SAW Filters - GSIF



TB0213A

Low Loss 70MHz IF SAW Filter - TAI-SAW Technology



TB025

Microcontrollers - Microchip Technology



TB026

Calculating Program Memory Checksums Using a PIC16F87X - Microchip Technology



TB02xxA

(TB0xxxA) SAW Filters - GSIF