Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Hex file downloads (http://www.chiefdelphi.com/forums/showthread.php?t=40254)

Ryan M. 29-10-2005 18:30

Hex file downloads
 
Does anyone out there know how the hex files relate to the actual instruction set (IE, what's specified in section 24 of the PIC datasheet) the controller runs? I already know the hex file format, but I want to basically know how the controller takes that and translates it into the instructions that it runs.

If you don't get what I mean/want... think harder. :rolleyes:

sciguy125 29-10-2005 19:18

Re: Hex file downloads
 
The data in the hex file is the instructions that the processor reads.

Take the following instruction for instance:
Code:

clrf 0x2C
That tells the processor to clear address 0x2C (set it to zero). According to the datasheet (Table 24-1), that insturction is the following in binary:

Code:

0110 1010 0010 1100
in hex:

Code:

6A 2C
If you were to find that instruction in a piece of code somewhere, the hex file for that code would have 6A 2C whereever the instruction is supposed to go.

Ryan M. 29-10-2005 19:50

Re: Hex file downloads
 
Oh... duh (/me smacks self) I forgot about the arguments. I couldn't find any way any of the hex fit an instruction. (They were all too long...) :D

Thanks!


All times are GMT -5. The time now is 20:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi