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

2 rs232 interruptions

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







2 rs232 interruptions
PostPosted: Fri Oct 04, 2002 1:09 am     Reply with quote

Hello all,

Is it possible on a 16F8xx or 18xxxx chip to have two RS232 ports, with separate interruptions ?
I need to get data from a serial port by IT, and get data on another serial port (both on the same chip) to get data too.
But I need IT for both ! (one connected to a GPRS phone, so when someone call, I get data in the IT function, and another connected to a PC to get data at a high speed, so I need IT to avoid loosing chars).
Thanks in advance,
Regards,
Matt.
___________________________
This message was ported from CCS's old forum
Original Post ID: 7411
Phil G
Guest







Re: 2 rs232 interruptions
PostPosted: Fri Oct 04, 2002 5:56 am     Reply with quote

Hi,
I just went through this:
Onthe PIC18 with 2 hardware serial ports (C6&C7, G1 & G2)
the INT_RDA is for the C6-C7 port, and INT_RDA2 is for the G1-G2 port.
Note here that kbhit() does not work for the G1-G2 port, so if you need this you need to work around by accessing the hardware diraectly:

#bit portg_kbhit = 0xFA4.5
.
.

and then instead of
if(kbhit())...
use
if(portg_kbhit)...

Phil

:=Hello all,
:=
:=Is it possible on a 16F8xx or 18xxxx chip to have two RS232 ports, with separate interruptions ?
:=I need to get data from a serial port by IT, and get data on another serial port (both on the same chip) to get data too.
:=But I need IT for both ! (one connected to a GPRS phone, so when someone call, I get data in the IT function, and another connected to a PC to get data at a high speed, so I need IT to avoid loosing chars).
:=Thanks in advance,
:=Regards,
:=Matt.
___________________________
This message was ported from CCS's old forum
Original Post ID: 7417
KenMac



Joined: 27 Jul 2005
Posts: 1
Location: Glasgow

View user's profile Send private message

But the manual says...
PostPosted: Fri Aug 26, 2005 3:55 am     Reply with quote

says that value = kbhit (stream) is legal. Is this not true?
Ttelmah
Guest







PostPosted: Fri Aug 26, 2005 4:40 am     Reply with quote

Look at the date involved....
The problem though is that the approach is limited in speed, and I/O to the hardware UART using interrupts can then interfere with the timings of the software UART.
Using a MAX3100, a PIC with two hardware UARTs, or another really small PIC communicating via I2C/SPI, are the 'better' methods to get good reliability.

Best Wishes
Andre Jr. Richard



Joined: 23 Sep 2003
Posts: 6

View user's profile Send private message

PostPosted: Thu Oct 20, 2005 12:24 pm     Reply with quote

18F8722
ALFA 705



Joined: 03 Jun 2005
Posts: 9

View user's profile Send private message

PostPosted: Thu Oct 20, 2005 2:17 pm     Reply with quote

Hi,

be carefully with 18F8722 and others PICs family.
Microchip is working in a "bug" about their EUSART. This will resut in ERRATA.

That's all I can tell you.

ALFA 705
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