Hi,
I am a beginner learning C language for PIC. I am using MPLAB X with XC8 on OSX. My question is I was reading up about C language from books and online tutorials and I came across a few discrepancies which I cannot find answers to.
1) Are there different instructions for delay? For example I came across Delay10KTCYx(), delay ms() and __delay_ms()
What's the difference? And are they due to the different compiler's language i.e XC8 , C18 etc? Or are they one and the same and I can use in XC 8?
2) Some tutorials tell you to specify your PIC in the header with
#include <xc.h> or #include <p18f452.h> or #include <htc.h>
Again what's the difference?
What should a beginner take note of when programming? It is complicated enough knowing there is an assembler language and High level language.
I opted to just jump straight into C language and I realised there are differences in the compiler that you used.
I would appreciate if someone give me some advise on learning C language for picf16 and picf18.
I bought Tim Wilmshurst "Designing Embedded Systems with PIC Microcontrollers"
to learn PIC. Is it outdated already?
Thanks in advance.
I am a beginner learning C language for PIC. I am using MPLAB X with XC8 on OSX. My question is I was reading up about C language from books and online tutorials and I came across a few discrepancies which I cannot find answers to.
1) Are there different instructions for delay? For example I came across Delay10KTCYx(), delay ms() and __delay_ms()
What's the difference? And are they due to the different compiler's language i.e XC8 , C18 etc? Or are they one and the same and I can use in XC 8?
2) Some tutorials tell you to specify your PIC in the header with
#include <xc.h> or #include <p18f452.h> or #include <htc.h>
Again what's the difference?
What should a beginner take note of when programming? It is complicated enough knowing there is an assembler language and High level language.
I opted to just jump straight into C language and I realised there are differences in the compiler that you used.
I would appreciate if someone give me some advise on learning C language for picf16 and picf18.
I bought Tim Wilmshurst "Designing Embedded Systems with PIC Microcontrollers"
to learn PIC. Is it outdated already?
Thanks in advance.