I am trying to get started with C18 and I am curious about the #include <p18Cxxx.h> statement. Does this give you access to all of the default device i/o ports, and would I need to also do an include for my specific processor #include <p18f4550.h> to get access to things specific to this processor.
tnx.mike.
The p18Cxxx header file is for a different processor. You'll need to #include <p18f4550.h> to define labels for that particular chip (i.e. PORTA, PORTB, etc.)
Ok, that's what I was thinking. So the p18Cxxx.h would include the things that would be 'general' to all pics, like PortA and PortB but not a Usart(hardware) as it's not included in all pics..
Sometimes Microchip uses the " ifdef p18Cxxx " when talking about pic18 as opposed to pic24 or pic33 so I've always assumed it was a generic header.... When you open it up, it lists all pic18's and includes the right header anyway..
I figured that was the header file for processors like the PIC18C442 and the PIC18C452 (hence the p18Cxxx--the x's take place of the last three numbers in the processor). I think that's a header for a different chip family. You don't need it at all for the 4550.
I figured that was the header file for processors like the PIC18C442 and the PIC18C452 (hence the p18Cxxx--the x's take place of the last three numbers in the processor). I think that's a header for a different chip family. You don't need it at all for the 4550.
Sometimes Microchip uses the " ifdef p18Cxxx " when talking about pic18 as opposed to pic24 or pic33 so I've always assumed it was a generic header.... When you open it up, it lists all pic18's and includes the right header anyway..
Yup, I did open up that header and look at it a few days ago, I was still a tad confused, I haven't really done programming since my last job (over 10 yrs ago).
I did do a little .asm stuff when I bought my Junebug about 2 yrs ago but want to try my hand at .c .
I'm not sure this is the best place to ask--You might be given unclejed's 'Yosemite Sam Award'
But to answer your question, the last time I installed MPLAB X (it was quite recently--within the past couple of weeks) it still had a lot of bugs. It still works, it's just that there are some pieces of code that it just doesn't really like. I'm not sure when it will all be fixed.
Hmm, That sounds like something I should look into. I just printed out some info from the help files included with C18 and the tags ( FOSC = INTOSC_HS ) come up as invalid/error, why are they in the help file if they are not the correct information. I have been going one step forward and 2 steps back. I was going to look into Hi-Tech but I don't see any info on how to talk to the i/o stuff (adc, usart,ports) in their docs.
The thing about C18...If you need to know a " parameter " or a "definition" you need to hunt down the .h file and search through it... @Vizier! does it make a decent COFF file for use in ISIS?
The thing about C18...If you need to know a " parameter " or a "definition" you need to hunt down the .h file and search through it... @Vizier! does it make a decent COFF file for use in ISIS?
Well there is what is in the "manual" that you can download, what is in the help files that come with the compiler, and what is in the .h file, none match!!!!
The thing about C18...If you need to know a " parameter " or a "definition" you need to hunt down the .h file and search through it... @Vizier! does it make a decent COFF file for use in ISIS?
Hi Ian,
I'm not sure about ISIS since I've never used it, but here are the files generated, probably they're sufficient for your simulation?:
**broken link removed**
The nice part is you can configure the Config part (Prescaler, Postscaler, WDT, HS/XT/RC, etc.) in one window (Project>>Edit Project) and change 'em accordingly.
Err are you referring to MikroC? Yes, they can include asm in the programming, but I haven't quite got into that. The reason I use MikroC is to rid of assembly at the first place.