| | Quote: | | | Posted by Gramps43 | | | |
| It would seem that following your logic and I'm not questioning it, that building a PIC controlled machine wouldn't be the way to go. Unless of course you design your own and are in control of all the variables and writing the software for your particular conditions. | |
| | |
Gramps, that is NOT my logic, as you call it. That is the way microcontrollers work. You MUST have the source code for each and every use of a part. In most PIC devices, for example, there are at least 8 inputs and outputs which can be used as either or both depending on program control. There are smaller PIC devices but the requirements of a metal detector make it important to use at least 8 or more. So, let's say we both design something using the same part in a metal detector circuit. If you use output 1 to control something and I use output 2 to control the same thing, the software must be written to reflect that use. Right away, it should become clear that the same software cannot be used in both.
Now, fast forward to a complete project where we both have working devices and we are ready to make final program compilations so the machine can operate. We both MUST create HEX files from our SOURCE CODE that makes our machines work. Since we used different outputs for making the same function, when we compile our code into HEX code, the files will be different and your HEX code will not work in my machine and vice versa. Not only that but the HEX code is not editable in the same way that source code is. You can't just leap in there and change one byte. During the compile, the HEX file is created in a top down fashion. That means from the first line of code all the way to the end, it is chopped and compiled into HEX. If your control program for the output number 1 is in the source code at a different place than mine, the HEX file will be way, way different making editing impossible. Even if they are exactly the same except for the single line difference, the code will compile radically different and you won't be able to find the changes in the HEX file.
Now I went to a lot of trouble to explain this to you. I am NOT being mean to your mate. I am trying desperately to be kind to him and also to you.
Posted on: November 03, 2012, 10:24:49 PM
FYI, there are also vastly different ways to make a program work the same with a different methodology in the source code. Even the same part in a single circuit can be programmed differently and have different HEX code which works the same even thought it is different. The logic behind that is simplistic versus brute force coding. I might write my source code to do a step by step, brute force method and later write it using subroutines that can be reused later. I might put my variables into a data structure or simply execute formulas each time without using a structure. Personal choice. All of this makes the HEX code unique.
Like I said earlier, the impossible dream. He is absolutely dead stuck without the source code and nobody here seems to have it. He needs to contact the original designer for the source code and then he needs to validate it against the hardware to be sure it will work. Only then can he compile it with any hope of getting his machine to work.
Linkback: You are not allowed to view links.
Please Register or Login
http://www.thunting.com/smf/index.php/topic,38333.msg236281.html#msg236281
|
|
Logged
|
It's all about that moment when metal that hasn't seen the light of day for generations frees itself from the soil and presents itself to me.
Let's Talk Treasure!
|