Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > ASM y Microcontroladores
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 22-03-2008
Avatar de MaMu
MaMu MaMu is offline
Miembro
 
Registrado: abr 2006
Ubicación: Argentina
Posts: 863
Poder: 21
MaMu Va por buen camino
La función de ReadLine, llena un buffer línea a línea del contenido del HEX, y va traduciendo la lectura según esta conformada la linea. La explicación es sencilla, y se basa en el formato Hex de Intel

Código:
Intel Hex is a common format to store binaries to be loaded into EPROM for
CPU's. It is a readable textformat that is line oriented. A line is built as

':', rec len, address, rec type, [data], checksum
whereas :
':' is start of record = 0x3A
reclen is the number of databytes as 2 digit hex
address is 4 digit hex, where the data starts
rec type is '00' for normal data, '01' end of file, '02' extended adress
[data] is a data packet encoded as hex
checksum is the 2's complement of the sum over the record excl the ':' modulo 256 as hex
Donde deja un ejemplo claro


Código:
 
:1005AA00000102030405060708090A0B0C0D0E0F88
rec len = 0x10 = 16
address = 0x05AA
data = 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
checksum = 0x88 = 256 -sum(0x00+..+0x0F)= 256- 0x78
Y a tomar encuenta el mapeo según el tipo de Eprom

Código:
There are extended formats, and there is the chance that the EPROM
is not located at 0x0000, but at 0xF0000 or similar.
Al encontrarse con un dato no válido, la función retorna el código de error #integer, sino devueve 0=OK.


Saludos
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Consulta Delphi 6, Delphi 2005 y Delphi 2006 Leviatan Varios 6 18-08-2007 16:02:08


La franja horaria es GMT +2. Ahora son las 18:42:19.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi