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 CCS Technical Support

getchar()

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







getchar()
PostPosted: Wed Mar 01, 2006 2:12 pm     Reply with quote

Device = F628A with UART enabled

Can I write my own RDA interrupt and not affecting getchar() operation? Or can I cascade my ISR routine back to the CCS one?

Basically I want to stop any delay_xx() function when an incoming character like 0xff is in and reset the whole device to start from beginning and then start processing incoming UART streams (of course, the first chararcter will be discarded or lost).
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Re: getchar()
PostPosted: Wed Mar 01, 2006 3:45 pm     Reply with quote

guest wrote:
Can I write my own RDA interrupt and not affecting getchar() operation?


Yes. If I'm not mistaken, and if I understood your question correctly, the following should work.
Code:

#INT_RDA
void isr_rda()
{
 // Anything goes here except getchar() and such
 // However, keep the ISR execution time as short as practical
}

void main()
{
 // initialize variables
 // initialize hardware
 // enable interrupts
 while (1)
 {
  getchar();
 }
}


Hope it helped.
Guest








PostPosted: Wed Mar 01, 2006 4:10 pm     Reply with quote

thanx!
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