Foros de Electrónica

Comunidad de discusión sobre Automatización, Electrónica industrial, Microcontroladores y electrónica digital, Robótica, Domótica, Telemática, Tecnologías móviles, y muchos temas más.




Estructura de Archivos HEX


       



#1  Estructura de Archivos HEX
Elvic
Ubicación: Mexico
Registrado: 12 Abr 2007
Mensajes: 350
citar
hola a todos
bueno de casualidad me encontré esta información, muy interesante por cierto,
el único detalle es el idioma, pues solo entiendo un poco, estaría agradecido si alguno de ustedes me ayudara con su traducción al español.
Gracias


Shelling The Intel 8-bit Hex File Format
Intel 8-bit Hex File Format is the most common hex file format used in the world as far as I know. There is also Motorola Hex file format and maybe other. Creating applications with AVR-GCC we usually select ihex output file format what means Intel hex file format. Lets go through it and see whats inside. It is simple as 6 and 6 (six and six), because each Hex file line consists of six parts. And there can be 6 record types in hex file.
Lets go through all six parts of each line:


· Start code is always character ‘:’;
· Byte count takes one byte (hex pair) indicating a number of bytes in a data field of the lin. Usually there are 16 or 32 bytes of data in each line;
· Address takes two bytes (16 bits – four hex digits). Address shows the beginning of memory position for the data. 16 bits gives a limit of 64kilobytes. This is worked around by specifying higher bits via other record types;
· Record type takes one byte (two hex digits). It defines the type of data field;
· Data is a sequence of n bytes (2*n hex digits);
· Checksum is one byte (two hex digits). It is a last byte in a line. It is calculated from fields: byte count, Address, record type and data and taking its Two’s complement . Start code and checksum itself isn’t included.
Check sum calculation example:
:040F40009F4F089522
Taking all the data bytes above, we have to calculate the checksum based on the following hexadecimal values:
04+0F+40+00+9F+4F+08+95 = 1DE
The value is greater then we leave part which is less than FF,so we get DE.
Then Twos complement is 100h-DE=22
In Intel Hex File Format there are six types of record types:
· 00 – data record;
· 01 – End of file record. Usually it is “:00000001FF”;
· 02 – Extended Segment address record. This indicates segment base address when 16 bits is not enough for addressing memory;
· 03 – Start segment address record. Indicates initial segment base address.
· 04 - Extended Linear Address Record – allows 32 bit addressing.
· 05 – Start Linear Address Record.
By concluding all of this:
Sample hex file:
:1000000012C02BC02AC029C028C027C026C025C0C6
:1000100024C023C022C021C020C01FC01EC01DC0DC
:100020001CC01BC01AC011241FBECFE5D4E0DEBF28
:10003000CDBF10E0A0E6B0E0ECE9F0E002C0059032
:100040000D92A036B107D9F710E0A0E6B0E001C0EC
:100050001D92A036B107E1F701C0D2CFCAE5D4E0C6
:10006000DEBFCDBFA7E0B0E00BD0802DFE01319602
:10007000A0E0B0E085E0182E0BD080E090E00DC04D
:10008000E199FECFBFBBAEBBE09A11960DB20895C9
:0C009000F7DF01921A94E1F70895FFCF0A
:00000001FF

#2  
mcrven
Colaborador
Ubicación: Caracas, Venezuela
Registrado: 19 Feb 2007
Mensajes: 720
citar
Elvic, en el link siguiente y en idioma español, está claramente definido el sistema Intel HEX. Busca el título "ESCRITURA DE DATOS" en esta página.

http://arantxa.ii.uam.es/~etc1lab/practicas2006/ETC1-Practica4.htm

Diviertete: mcrven

#3  
Elvic
Ubicación: Mexico
Registrado: 12 Abr 2007
Mensajes: 350
citar
mcrven, muchas gracias por la información.

suerT

 Responder



 Otros temas de interés 
El tema está cerrado y no puedes editar mensajes o responder Destacado: Data cable siemens RS-232
No hay mensajes nuevos Data Cable Nokia RS-232: Forum
No hay mensajes nuevos Diagrama de construcción data cable Nokia DKU-5 (USB)
No hay mensajes nuevos Data cable para siemens c65
No hay mensajes nuevos Construcción del data cable Nokia 3595

Foros de Electronica
|| Cuestiones Elementales de Electrónica || Fuentes de alimentacion || Circuitos de radio || Diseño de circuitos en general ||
|| Sistemas de Audio: Preamplificadores, Ecualizadores || Amplificadores || Reparación || Discusión ||
|| Microcontroladores y sistemas embebidos || Circuitos logicos combinacionales y secuenciales || Interfaces y Programacion || Dudas en general || Sistemas de Video || PC Hardware || Telematica y comunicaciones || Tecnologias moviles || Software Electronico || Robotica, Domotica y Mecatronica || Autotrónica || Automatizacion, Electronica industrial y de Potencia || Documentacion, circuitos y esquemas || Donde Las Ideas Convergen... || Tutoriales y Manuales || Proyectos Prácticos ||
Contacto | Acerca de | Ayuda | Normas de la Comunidad | Privacidad | Mapa de los foros
© Foros de Electrónica - Comunidad Internacional de Electrónicos