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

How to know if PIC uses Hardware or software UART

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



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

How to know if PIC uses Hardware or software UART
PostPosted: Thu Mar 17, 2005 9:57 am     Reply with quote

How can I know if CCS C on my PIC uses hardware or software UART.

Another thing, if I have this code:

#ISR_EXT
{
PORT_A = 0xFF;
}

main()
{
PORT_A =0x00;
}

What will happen if the interrupt is triggered, and what will happen after the ISR is done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 17, 2005 10:39 am     Reply with quote

Quote:
How can I know if CCS C on my PIC uses hardware or software UART.

This question was answered recently. See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=22149


Quote:
What will happen if the interrupt is triggered, and what will happen after the ISR is done.

See the following thread which has a demo program for INT_EXT
with lots of explanations and comments.
http://www.ccsinfo.com/forum/viewtopic.php?t=17041
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Mar 17, 2005 12:27 pm     Reply with quote

if this is your main

Code:
main()
{
PORT_A =0x00;
}



The PIC will goto sleep. You need something like
Code:
main()
{
  PORT_A =0x00;

  while(1)
  {
  }
}
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

PostPosted: Thu Mar 17, 2005 8:08 pm     Reply with quote

Mark wrote:
if this is your main

Code:
main()
{
PORT_A =0x00;
}



The PIC will goto sleep. You need something like
Code:
main()
{
  PORT_A =0x00;

  while(1)
  {
  }
}


When testing the code without while(1);, the microcontrolelr seems to reset when tested in proteus.
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