View previous topic :: View next topic |
Author |
Message |
NuwanR
Joined: 24 Mar 2011 Posts: 2
|
PIC18 C18 to PIC16 CCS C Problem |
Posted: Thu Mar 24, 2011 12:28 pm |
|
|
Hi I'm new to pic programming and I have found a code fragment done in C18 and using pic18. I want to convert that into PIC16. I wish anyone can help me to resolve this.
I have some lines like this in the C18 code, I want to convert them to PIC16 CCS C, I have managed to change some but there are some which I don't understand to implement
char tempInterrupts;
tempInterrupts = INTCONbits.GIE;
INTCONbits.GIE = 0;
INTCONbits.GIE = tempInterrupts;
I have converted INTCONbits.GIE = 0; to disable_interrupts(GLOBAL); but I want read and get the value from the interrupt as in this line to assign it to the variable, any idea how to do that in CCS c?
tempInterrupts = INTCONbits.GIE;
How to capture the value in INTCONbits.GIE; using the CCS methods?
Thank you
Nuwan |
|
 |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
 |
NuwanR
Joined: 24 Mar 2011 Posts: 2
|
|
Posted: Fri Mar 25, 2011 1:31 am |
|
|
Thank you PCM Programmer, will try to implement that.. |
|
 |
|