CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC18 C18 to PIC16 CCS C Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
NuwanR



Joined: 24 Mar 2011
Posts: 2

View user's profile Send private message

PIC18 C18 to PIC16 CCS C Problem
PostPosted: Thu Mar 24, 2011 12:28 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Mar 24, 2011 1:01 pm     Reply with quote

See my post at the end of this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=44964
NuwanR



Joined: 24 Mar 2011
Posts: 2

View user's profile Send private message

PostPosted: Fri Mar 25, 2011 1:31 am     Reply with quote

Thank you PCM Programmer, will try to implement that..
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group