Hi all, if anybody could help me with figuring out headers i would appreciate it. i get what they're all about and stuff, and i've googled a lot about them, so that's not the issue, but i didn't know how to ask what's confusing me in google so i'll need some actual human help...
i've been reading and watching a bunch of tutorials online about different microcontrollers and how to program them using C/C++ but they're all using different programming environments and different microcontrollers - but of course the basic idea is the same. as far as headers are concerned, they're all initializing different headers and using slightly different syntax while programming. so my question is how do you know what headers to call? is it part of the microcontroller documentation or the software documentation or what??? i would like to start programming on my own without without looking at a tutorial but i can't get past this. and somewhat related...how do you know the proper syntax to use?? for example i saw one tutorial that set bits by saying
and another
Now, I understand what both of these codes are doing but I don't understand when to use which. Are they interchangeable? Or is it the compiler or the chip (they were using different chips). i'm just not sure.
Thanks for any clarification...
i've been reading and watching a bunch of tutorials online about different microcontrollers and how to program them using C/C++ but they're all using different programming environments and different microcontrollers - but of course the basic idea is the same. as far as headers are concerned, they're all initializing different headers and using slightly different syntax while programming. so my question is how do you know what headers to call? is it part of the microcontroller documentation or the software documentation or what??? i would like to start programming on my own without without looking at a tutorial but i can't get past this. and somewhat related...how do you know the proper syntax to use?? for example i saw one tutorial that set bits by saying
Rich (BB code):
TRISIO.B2 = 1; //Sets pin B2 to output
Rich (BB code):
DDRB |= 1 << PINB2; //Sets pin B2 to output
Thanks for any clarification...