View Full Version : 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
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.
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-2017, Jelsoft Enterprises Ltd.