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

2 x serial?

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



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

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

2 x serial?
PostPosted: Wed Jan 25, 2006 5:17 am     Reply with quote

Setting up 1 x serial RS485, is not a problem,
I am in the process in having an other serial port on the micro.

1 x serial is the built in serial on the micro (18f4620)
the 2nd serial is set on port B0(rx) and B4(tx)
with the rx on the in built,I use
Code:

#INT_RDA              //RS232 receive data available
void comA_isr()                         // BYTE RECIEVED
{   Rx = fgetC(COM_A);    // Get incomming byte from 1st comms
......
}


my question is can I setup a second intrupt, port B0 (int0) as the second rx
Code:
#INT_EXT              // External interrupt
void comB_isr()
{   Rx = fgetC(COM_B);    // Get incomming byte from 2nd comms
......
}


is this posible

Andrew
_________________
What has been learnt if you make the same mistake? Wink
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

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

PostPosted: Wed Jan 25, 2006 5:36 am     Reply with quote

Embarassed I found a post that I had answered earlier that had answered my question. (EX_PBUSM.C and EX_PBUSR.C) are 2 examples that uses
Code:
#int_ext
void pbus_isr() {
....}


I guess, I need to be aware of the intrupt handling, How would this be done to ensure intrupt dont activate at the same time.

ANdrew
_________________
What has been learnt if you make the same mistake? Wink
ferrumvir



Joined: 01 Feb 2006
Posts: 64
Location: England

View user's profile Send private message Visit poster's website

Thanks
PostPosted: Wed Feb 01, 2006 4:07 am     Reply with quote

Very Happy The system works, performed a search, popped up with your message, found exactly what I was after.

Thanks for replying to your own message.

Cheers Scott
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