Hello,
We'll ive been coding away at my project (using MPLAB IDE, C18) and am now at 250 lines of code and things are getting a littly hairy. so i thought id seek some guidance in writing code that compiles effeciently for the PIC.
I use a lot of subroutines. Is there a resource hit for each subroutine? or does it all end up the same once compiled?
liek for example i have:
getADC();
conv2temp();
setAlarm();
display();
etc.
all to manipulate one piece of data from the ADC. am i hurting myself w/ a bunch of subroutine calls? it could easily be done just the same sequentially but i like the 'readability' of the subroutine calls.
any other general tips/tricks to make my C code as PIC friendly as possible?
Thanks
We'll ive been coding away at my project (using MPLAB IDE, C18) and am now at 250 lines of code and things are getting a littly hairy. so i thought id seek some guidance in writing code that compiles effeciently for the PIC.
I use a lot of subroutines. Is there a resource hit for each subroutine? or does it all end up the same once compiled?
liek for example i have:
getADC();
conv2temp();
setAlarm();
display();
etc.
all to manipulate one piece of data from the ADC. am i hurting myself w/ a bunch of subroutine calls? it could easily be done just the same sequentially but i like the 'readability' of the subroutine calls.
any other general tips/tricks to make my C code as PIC friendly as possible?
Thanks