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

Problem with RS232

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

Problem with RS232
PostPosted: Mon Jul 22, 2013 12:26 pm     Reply with quote

Greetings! I'm using MPlab v8.91, CCS v4.134. I have a pcb with 3 16F628 and 1 16F88(master). The TX pin of 16F88 is connected to all RX(16F628). RX of 16F88 is connected to all TX pins. The problem is on RX master line. I don't have a stable voltage level there. I tried to add pull-up or down resistor - no effect. I think I must set the TX pins of 16F628 to float.
Can you give me an advice how to deal with this problem?
Thanks!
g-netix



Joined: 19 Aug 2012
Posts: 19

View user's profile Send private message

PostPosted: Mon Jul 22, 2013 12:36 pm     Reply with quote

I think the problem is that you have 3 TX tied together, and if one of these try to send data, there is always a constant level that is in conflict with the data. You should try to put some resistors on each TX line or perhaps float high, but I don't know if it works with hardware UART.

Hope I helped you ;)
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Mon Jul 22, 2013 12:44 pm     Reply with quote

I was thinking to set the inactive TXs to float_high, too! But I`m not sure if I use for example output_float(), I will be able to restore the UART settings with putc() command...

Last edited by stoyanoff on Mon Jul 22, 2013 12:44 pm; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9164
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jul 22, 2013 12:44 pm     Reply with quote

You might want to look at the CCS example on how to connect multiple PICs into a small network.Not only do the show you the hardware in the FAQ section of the help files, they have software in the examples as well..

Most people now use the RS-485 'defacto standard' for small networks, though you can use slightly modified RS-232 hardware.

I've used a novel VVSI system for decades while not fast it has been ultra reliable.

So there are several choices.

hth
jay
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Mon Jul 22, 2013 5:38 pm     Reply with quote

To connect ONE TX pin to multiple RX pins - feed EACH RX through a 220 ohm resistor.

To combine MULTIPLE TX feeds : use CMOS "AND" gates to combine to a single line, and make sure in code that all PICS don't all talk at once.

A simple STAR net can be created with just AND gates and resistors
so long as baud rate and distance are not excessive.
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