View previous topic :: View next topic |
Author |
Message |
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
2 x serial? |
Posted: Wed Jan 25, 2006 5:17 am |
|
|
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](images/smiles/icon_wink.gif) |
|
![](templates/subSilver/images/spacer.gif) |
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Wed Jan 25, 2006 5:36 am |
|
|
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](images/smiles/icon_wink.gif) |
|
![](templates/subSilver/images/spacer.gif) |
ferrumvir
Joined: 01 Feb 2006 Posts: 64 Location: England
|
Thanks |
Posted: Wed Feb 01, 2006 4:07 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|