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

#use rs232 FLOAT_HIGH concept

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







#use rs232 FLOAT_HIGH concept
PostPosted: Fri May 23, 2008 2:50 am     Reply with quote

Hello,

I have to communicate 5 pic's using one wire interface. I'm going to use CCS method: "ccsinfo.com/faq.php?23"

I don't know why is neccesary FLOAT_HIGH parameter. When you use RS232 communication with a transceiver as MAX232, you don't need to use this parameter and the reception line from the MAX232 to the microcontroller is high (5V) when there isn't data. If you conect the PIC's direct in a line with one pull-up resistor, the line is high (5V) without data, so I don't understand the concept FLOAT_HIGH.

Best regards,
Ttelmah
Guest







PostPosted: Fri May 23, 2008 4:17 am     Reply with quote

Keyword, is 'float', as opposed to 'pull'.
The normal TTL serial output, when idle, _pulls_ high. The output driver is turned on, pulling the line up towards 5v. Now the problem is that if you connect multiple chips together, and one wants to drive the line _low_, all the other chips will be pulling the line high, and will 'fight' the one trying to use the line. The 'float_high' option, changes the serial behaviour, so when it is not being pulled low, the driver is turned _off_. This then requires an external resistor to take the line 'high', but this becomes the only thing making the line go high, which allows any device to pull it low, when it wants, without the fighting... Smile

Best Wishes
aitora
Guest







PostPosted: Fri May 23, 2008 6:52 am     Reply with quote

Thank you for your reply,

I have another idea to do the communication in the line. I want to make all the nodes slave's with the pin configured as input. Only the master is configured as output maintaining the line to pull. All the communications are initialized by the master, so the master answer and configure his line as input. The node that needs to response, configure the pin as output in this moment and response in the line. After the response, the master return to put the pin as output and the rest of slaves nodes are input.

So in that way, there is only one pin configured as output in one moment in the line. I don't know what is the physical state of the pin TRIS correspond to the pin of the communication when you configure FLOAT_HIGH in the #use RS232. Maybe the result is the same that I propose. I think that my way could be more program difficult but more stable in the communication.

What do you think?

Best regards,
aitora
Guest







Question?
PostPosted: Wed May 28, 2008 7:19 am     Reply with quote

I have configure one-wire net with 6 microcontrollers and 35 meters cable. I have used #use RS232 FLOAT_HIGH option. I continue with my question, because the net works with the final pull resistor or without the resistor.

If I put only one microcontroller in the net programmed with the option FLOAT_HIGH, the net goes directly to +5V. In this way, I don´t understand FLOAT_HIGH concept.

I think I'm going to control manually the TRIS pin as I have described in my last post. Someone can coment this?

Best regards,
golf
Guest







PostPosted: Wed May 28, 2008 10:06 am     Reply with quote

i think you are trying to make the same

making tris an input will float the output, so the only difference is
who does the job, you or the compiler

the pullup resistor is a good idea, if you don't want to receive
changing readings in the input when no one is in output mode
michelle
Guest







PostPosted: Wed May 28, 2008 11:28 am     Reply with quote

Hello!

I have a question about one-wire protocol.
According to the example ex_pbusr and ex_pbusm this method uses the same pin to send and receive; this pin is also the external interrupt.
The question is: when the sender sends data, ¿does it jump to the interrupt?
¿making a INT pin an output disables the external interrupt?

Thanks!
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