View Full Version : Hex file downloads
Ryan M.
10-29-2005, 06:30 PM
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
10-29-2005, 07:18 PM
The data in the hex file is the instructions that the processor reads.
Take the following instruction for instance:
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:
0110 1010 0010 1100
in hex:
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.
10-29-2005, 07:50 PM
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!
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.