TB025 Microchip Technology, TB025 Datasheet - Page 2

no-image

TB025

Manufacturer Part Number
TB025
Description
Microcontrollers
Manufacturer
Microchip Technology
Datasheet
www.DataSheet4U.com
TB025
FIGURE 1:
HEX FILE FORMAT
The data to be programmed into program memory will
be read into the microcontroller using one of its stan-
dard interface modules: SPI, I
Probably the simplest format to send the data to the
microcontroller is in the standard HEX format used by
the Microchip development tools. The formats sup-
ported are the Intel HEX Format (INHX8M), Intel Split
HEX Format (INHX8S), and the Intel HEX 32 Format
(INHX32). The most commonly used formats are the
INHX8M and INHX32 and therefore are the only for-
mats discussed in this document.
Appendix A in the MPASM User's Guide (DS33014) for
more information about HEX file formats. The differ-
ence between INHX8M and INHX32 is that INHX32
supports 32-bit addresses using a linear address
record. The basic format of the hex file is the same
between both formats as shown below:
Each data record begins with a 9 character prefix and
always ends with a 2 character checksum. All records
begin with a ' : ' regardless of the format. The individual
elements are described below.
• BB - is a two digit hexadecimal byte count repre-
DS91025A-page 2
senting the number of data bytes that will appear
bit7
bit 7:
bit 6:4: Unimplemented: Read as '0'
bit 3:
bit 2:
bit 1:
bit 0:
R/W-x
EEPGD —
:BBAAAATTHHHH...HHHHCC
EEPGD : Program / Data EEPROM Select bit
1 = Accesses Program memory
0 = Accesses data memory
WRERR : EEPROM Error Flag bit
1 = A write operation is prematurely terminated
0 = The write operation completed
WREN : EEPROM Write Enable bit
1 = Allows write cycles
0 = Inhibits write to the EEPROM
WR : Write Control bit
1 = initiates a write cycle.
0 = Write cycle to the EEPROM is complete
RD : Read Control bit
1 = Initiates an EEPROM read (read takes one cycle)
0 = Does not initiate an EEPROM read
U-0
The bit is cleared by hardware once write is complete.
The WR bit can only be set (not cleared) in software.
Note: This bit cannot be changed while a write operation is in progress.
(any MCLR reset or any WDT reset during normal operation)
RD is cleared in hardware. The RD bit can only be set (not cleared) in software.
EECON1 REGISTER
U-0
2
C™, USART, or PSP.
U-0
Please refer to
R/W-x
WRERR WREN
R/W-0
WR
R/S-0
• AAAA - is a four digit hexadecimal address repre-
• TT - is a two digit record type that will be '00' for
• HHHH - is a four digit hexadecimal data word. For-
• CC - is a two digit hexadecimal checksum that is
Since the PIC16F87X devices only have a maximum of
8K words, the linear address record '04' is ignored by
the routine. The HEX file is composed of ASCII char-
acters 0 thorough 9 and A to F and the end of each line
has a carriage return and linefeed. The downloader
code in the PICmicro microcontrollers must convert the
ASCII characters to binary numbers to be used for pro-
gramming.
on the line. Divide this number by two to get the
number of words per line.
senting the starting address of the data record.
Format is high byte first followed by low byte. The
address is doubled because this format only sup-
ports 8-bits (to find the real PICmicro address,
simply divide the value AAAA by 2).
data records, '01' for end of file records and '04'
for extended address record (INHX32 only).
mat is low byte followed by high byte. There will
be BB /2 data words following TT.
the two's complement of the sum of all the pre-
ceding bytes in the line record.
R/S-0
RD
bit0
R= Readable bit
W= Writable bit
S= Settable bit
U= Unimplemented bit,
read as ‘0’
- n= Value at POR reset
1998 Microchip Technology Inc.

Related parts for TB025