Thanks for the additional information, 800m is something very different from 
20m ;-)

I can imagine that 20m at 5V ground-referenced is doable, but when you're 
starting, better stick to the specifications and try your luck when you have a 
bit of experience.

I myself am at a similar project, like 15 meter, and I want to use as little 
standby current as possible, and no twisted pairs. It's uni-directional, with 
constant-current pullup at the receiver and optically isolated pulldown at the 
sender with 1200 baud... First test of the concept in a few days ;-)

If standby current was of no concern, I'd use RS422 or RS485 drivers/receivers, 
true RS232 is old-fashioned and needs to many components.


Greets,
Kiste

Am Mittwoch, 21. April 2021, 07:02:46 MESZ hat vsurducan <[email protected]> 
Folgendes geschrieben: 





Oliver, I remember the problems I had with an EIA232 with +/-8V output running 
at 800m at 9600bps. Everything works until due the transceiver heating the 
voltage dropped at +/-7.6V...:)
The length is given by the voltage at the level converter of the transmitter 
output. All level converters with charge pumps are not able to give more than 
+/-8V...+/-10V in the happiest circumstances.
Oldest/goldest EIA232 worked at +/-25V up to 2km.
For 20m you do noy need any level converter at the output of your PIC, just a 
twisted pair RX-GND TX-GND (CAT5 ethernet cable is perfect) and an open 
collector transmitter ( a gate) with pull-up resistor in the receiver end (at 
20m distance from the transmitter).
However Majid,  I think you need first to learn jal and for that there is a 
learning curve which has to be passed....
Please start with the examples, compile them, make them run, modify them as you 
wish and post only when nothing works for you after three days of trying...this 
will help you more than you may believe right now...
best wishes

On Wed, Apr 21, 2021 at 7:28 AM 'Oliver Seitz' via jallib 
<[email protected]> wrote:
> Hi Majid,
> 
> SPI is designed for centimeters, I don't think it can work reliably over 20 
> meters.
> 
> RS232 at 9600 baud is ok for 150 meters, if you're using real RS232 drivers 
> and receivers like from the MAX232 series. The PIC controller does not have 
> RS232, it has a usart which handles the NRZ protocol. This protocol is best 
> known as being used by the RS232 interface. Therefore the protocol itself is 
> commonly (but wrongly) referred to as "RS232"
> 
> RS232 uses negative voltages as a symbolic "1" and positive voltages for "0". 
> At the receiving side, the voltage must at least go higher than +3V for "0" 
> and lower than -3V for "1". At the sending side, voltages from up to +15V and 
> down to -15V are used.
> 
> So, to answer your question in two simple sentences: RS232 is ok for the job. 
> But RS232 is not what comes out of the controller.
> 
> Greets,
> Kiste
> 
> 
> 
> 
> Am Dienstag, 20. April 2021, 21:56:34 MESZ hat majid ebru 
> <[email protected]> Folgendes geschrieben: 
> 
> 
> 
> 
> 
> can i ask another  question??
> 
> if it is 20 meter distance between PICs , i should use RS232 or SPI?
> 
> so sorry and thanks a lot
> 
> ‪majid ebru‬‏ در تاریخ سه‌شنبه ۲۰ آوریل ۲۰۲۱ ساعت 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/1697687282.4677348.1618979276333%40mail.yahoo.com.
> 


-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtaBjojssk_HHFK1M2dhhL9CNNf3mygd1F3nH0B5bck9A%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/1020737915.4719521.1618983169979%40mail.yahoo.com.

Reply via email to