|
Post by nuwanr on Sept 19, 2012 6:15:22 GMT
Hi Paul,
I went through your firmware coding for this loco decoder. And saw that you have written it in Assembly. Have you got any source code written in C for this.
I'm asking this because I am doing the coding using C and its difficult for me to understand the code in Assembly since I do not have a knowledge in that language.
Can I port this application to C??
|
|
|
Post by Paul Harman on Sept 19, 2012 11:42:06 GMT
C is a high level language, you can write code in C and compile it in to a lower level language like assembler, but not the other way.
There is not really enough room in the 12F629 processor to take the large amount of code that a C compiler would produce, you would have to use a newer processor like the 12F1840 which has more code space and is a bit faster.
You really ought to try and learn PIC code, it is a RISC processor so there are only 35 instructions. Download MPLAB from Microchip and run the code through the MPLAB simulator and you will see what it does. Documentation within the code is not too bad.
|
|