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

PIC16F877

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



Joined: 07 Mar 2012
Posts: 1

View user's profile Send private message

PIC16F877
PostPosted: Tue May 15, 2012 8:36 am     Reply with quote

Dans la PIC16F877, il y a un seul USART donc une seul connexion RS232 (pins C6 et C7 du port C), mais dans mon projet j'ai besoin des plusieurs connexion RS232. De manière Soft, comment peut programmer cette connexion à l'aide des autres pins normaux ?


Translation to English:
In the PIC16F877, there is one USART therefore a single RS232 connection (pins C6 and C7 of the port C), but in my project I need several RS232 connections. So in software, how can I program these connection using other normal i/o pins?
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue May 15, 2012 9:08 am     Reply with quote

Do the serial ports all have to operate asynchronously
or could you multiplex and use one port at a time?
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Tue May 15, 2012 10:35 am     Reply with quote

What sort of baud rates are you wanting for the other UARTS?

Mike
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue May 15, 2012 1:03 pm     Reply with quote

See these threads about multiple software UARTs:
http://www.ccsinfo.com/forum/viewtopic.php?t=40246
http://www.ccsinfo.com/forum/viewtopic.php?p=66711
http://www.ccsinfo.com/forum/viewtopic.php?p=98433

http://notes-application.abcelectronique.com/003/3-5824.pdf

Brush Electronics used to sell source code to do multiple software UARTs
on a PIC (for CCS), using interrupts. But I don't see that product on
his website now. I don't know if he still sells it. He called it "Software
Emulated UART drivers".
http://www.brushelectronics.com
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Wed May 16, 2012 10:02 am     Reply with quote

Key questions are how many serial ports do you need, how fast must they run, and (most critical) will they potentially all transmit asynchronously? The most difficult operation is receiving data on multiple incoming ports at the same time.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu May 17, 2012 8:21 am     Reply with quote

Lastly as to the maximum COUNT of software UARTS that is safe and reliable to deploy?

In my experience the answer is ZERO.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 17, 2012 12:51 pm     Reply with quote

That's referring to CCS soft UARTs, I assume. What about interrupt-
driven soft uarts, that sample each bit, 3 or more times per bit, in a
Timer interrrupt routine ?
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Thu May 17, 2012 1:44 pm     Reply with quote

That was my point. At 115200 baud, it's not too likely. At 9600, there's a possibility.

People asking for advice on boards like this always take care to leave out the important information.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

ZERO UARTS of the CCS soft variety
PostPosted: Thu May 17, 2012 2:41 pm     Reply with quote

I have been happy with dual hardware UARTS IN a PIC
but never felt safe with soft uarts, even when interrupt driven.

Perhaps with a 40 mhz or greater Fosc and timer based bit testing , MAYBE then, ......

but it is not worth it to risk a commercial product and my reputation with flaky data handling, which is what I feel soft UARTS represent.

And adding multiple interrupts to the program just ups the soft uart risk.

But for a SOLID 8 channels of 115200 baud ????

I would rather put the effort into a design based on the Philips SCC2698B
parallel mated to an 18f872x @ 40 MHz.

In THAT approach- I would have total confidence, since you have a total of 10 UARTS, all interrupt capable, and the SCC chip ports, all deeply buffered, and a controller PIC possessing enough ram && MIPS, to process the data you receive.


soft uarts are a hobbyist grade concept, but

NOT IMHO, for any product of any kind, unless perhaps @ 300 baud .
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